regex
Finishes the specification of the sophisticated to contain expectation where the given regular expression pattern is expected to have a match, using a non-disjoint search.
Delegates to the regexPatterns(pattern).
Return
an Expect for the subject of this expectation.
Parameters
The pattern which is expected to have a match against the input of the search.
Samples
expect("ABC") toContain o exactly 1 regex "A(BC|C/DC)"
expect("AAABC") toContain o atMost 3 regex "A(BC|C/DC)"
expect("ABBBCD") toContain o atLeast 1 regex "AB[BC]+"
fails {
expect("AAAAAABBBB") toContain o atMost 3 regex "A(BC|C/DC)"
}
fails {
expect("AAABBBB") toContain o exactly 3 regex "A(BC|C/DC)"
}
fails {
expect("AAAAAABBBB") toContain o atLeast 3 regex "A(BC|C/DC)"
}Finishes the specification of the sophisticated to contain expectation where the given regular expression pattern is expected to have a match (ignoring case), using a non-disjoint search.
Delegates to the regexPatterns(pattern).
Return
an Expect for the subject of this expectation.
Parameters
The patterns which is expected to have a match against the input of the search.
Samples
expect("AbC") toContain o ignoring case regex "A(BC|C/DC)"
fails {
expect("aabaabbb") toContain o ignoring case regex "A(BC|C/DC)"
}Finishes the specification of the sophisticated to contain expectation where the given regular expression pattern is expected to have at least one match (ignoring case), using a non-disjoint search.
Delegates to atLeast 1 regex pattern.
Return
an Expect for the subject of this expectation.
Parameters
The patterns which is expected to have a match against the input of the search.
Samples
expect("AbC") toContain o ignoring case regex "A(BC|C/DC)"
fails {
expect("aabaabbb") toContain o ignoring case regex "A(BC|C/DC)"
}