Assert that an element's text content does or does not match a regex.
Step pattern
Then (I |we )*should( not)* see text matching "([^"]*)?" in( the)* "([^"]*)?" elementExamples
Example #1
Then I should see text matching "\d{4}" in the "#year" elementExample #2
Then I should see text matching "\$\d+\.\d{2}" in the "#price" elementExample #3
Then I should not see text matching "Error" in the "#status" elementExample #4
Then we should see text matching "^[A-Z][a-z]+ [A-Z][a-z]+$" in the "#full-name" elementExample #5
Then I should see text matching "(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}" in the "#date" element