Using regular expressions

You use regular expressions to find or verify text by identifying a pattern among multiple variations of text. For instance, you can use the .*@in.ibm.com regular expression to find multiple e-mail IDs ending with the @in.ibm.com domain.

About this task

To add a regular expression in a test, in the Test editor, select a step for which to apply the expression and select the matches regex or doesn't match regex operator.

Test editor with regular expression

To verify a regular expression before applying it to the test, type the expression and click the Toggle regular expression assistant icon Toggle regular expression assistant. In the Test regular expression tab, type the text that matches the regular expression. If the match is correct, the color of the matching text changes.

Test regular expression

The Captured Group tab displays the groups of regular expressions used within parentheses. The Overall group appears by default.

Feedback