doc / ch.tutteli.atrium.api.infix.en_GB / regex

regex

infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.regex(pattern: String): Expect<T>
infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.regex(pattern: String): Expect<T>

Finishes the specification of the sophisticated contains assertion where the given regular expression pattern is expected to have a match, using a non disjoint search.

Delegates to the regexPatterns(pattern).

Parameters

pattern - The pattern which is expected to have a match against the input of the search.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
An Expect for the current subject of the assertion.

@JvmName("regexIgnoringCase") infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>
@JvmName("regexIgnoringCase") infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>

Finishes the specification of the sophisticated contains assertion where the given regular expression pattern is expected to have a match (ignoring case), using a non disjoint search.

Delegates to the regexPatterns(pattern).

Parameters

pattern - The patterns which is expected to have a match against the input of the search.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
An Expect for the current subject of the assertion.

infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>
infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>

Finishes the specification of the sophisticated contains assertion 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.

Parameters

pattern - The patterns which is expected to have a match against the input of the search.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
An Expect for the current subject of the assertion.