| Title |
Test
Find
Separated Elements
|
| Expression |
^(?P<element>Element[0-9]+)(Separator(?P>element))*$ |
| Description |
An expression to verify whether a string contains elements of a specific pattern, separated by some separator. It is written in a generic form, so you can adapt it to your requirements. Of course the expression can be nested, in case you have elements that contain separated elements for their part. Some keywords for comprehension: named capture group, subroutine. |
| Matches |
Element1SeparatorElement2 | Element1SeparatorElement2SeparatorElement3 | ElementSeparatorElementSeparatorElement |
| Non-Matches |
ElementSeparatorBrokenElementSeparatorElement | ElementSeparatorElementSeparator | ElementSeparatorSeparatorElement |
| Author |
Rating:
Not yet rated.
jay-em
|
| Source |
|
| Your Rating |
|
Title: 3rd Matches test case is not valid
Name: Erwin
Date: 1/30/2016 5:18:19 AM
Comment:
The 3rd case from the Matches does not actually match.
After "Element", a number must follow according to the regexp.
The test case does not have that.