Platform (jvm, jdk8, js, android): all
expect("hello").matches(Regex("([hH]ello"))
which should result in reporting
expect: "hello World" (String<987383>)
* matches entirely: [hH]ello (Regex<123423>)
This assertion function matches the entire CharSequence in contrast to expect("hello").containsRegex(...), ergo it fails if it contains a match only within the CharSequence.
Following the things you need to do:
domain
matches which expects a Regex (see other functions as a guideline but use Expect instead of SubjectProvider)lib
MATCHES("matches entirely") to DescriptionCharSequenceAssertion for en_GBMATCHES("stimmt vollst盲ndig 眉berein mit") to DescriptionCharSequenceAssertion for de_CHapi (only fluent-en_GB)
matches (see other assertion functions in charSequenceAssertions.kt)I'll work on this if you would like to take this issue over.I'll work on this
@mikemolenda in case you already started with the implementation. I have removed the overload which expects only a String. I am not yet 100% sure if it is a good idea to add it. Let's start with Regex only