The RegEx Builder wizard is created to ease your process of building and testing Regular Expression search criteria. It contains a text editor, called Test Text, in which you can test the search criteria you choose against the text that you want to apply RegEx on. Below the text editor you can choose the Type, Value, and Quantifiers of the RegEx expressions you want to match the text to. Doing so highlights the findings in the Test Text editor. The Full Expression text box in the bottom of the wizard displays the current RegEx expression in its raw form.
The RegEx flavor used by the RegEx Builder wizard is the official .NET Framework Regular Expressions one, on which you can read more here.
The RegEx Builder wizard can be opened from the body of any of the three activities IsMatch, Matches, and Replace, by clicking the Configure Regular Expression button. This wizard helps you build the regular expressions you want to use for any of the three activities.
The Test Text input box enables you to highlight the results of running the current regular expressions you have configured against the text you want to use. We recommend using the Test Text input box of the RegEx Builder with the actual content you are going to work with.
The RegEx drop-down menu lets you choose between the many kinds of pre-generated RegEx expressions. The available options are:
- One of
- Not one of
- Any word character
- Starts with
- Ends with
- US date
- US phone number
Hovering over the button displays additional information on the corresponding preset, what it can be used for, and provides a short example.
The Value field enables you to type what you are looking for in the text. For example, if the Literal preset is selected, you can write a word you want to find in the text and it becomes highlighted in the Test Test field.
The Quantifiers drop-down menu enables you to select how many results you want to find for the searched term. There are multiple options for each possibility, and the input field next to this drop-down menu changes to accommodate each of them:
- Exactly - You may select an exact amount of consecutive occurrences you want to find. For example, if the text you are searching for is
loremand the Quantifiers is set to Exactly 2, the wizard finds any occurrences of
loremloremin the Text Test box.
- Any (0 or more) - This highlights any number of consecutive found matches, starting from 0.
- At least one (1 or more) - Highlights any number of consecutive found matches, starting from 1.
- Zero or one - Only highlights a single consecutive occurrence of the term.
- Between X and Y times - Highlights the amount of consecutive occurrences you select. For example, searching for
ipsumand selecting Between 2 and 3 times only highlights
Using the button, you can easily add multiple RegEx configurations. Then, by using and you can reorder the conditions or remove them by using .
The Full Expression field displays the current form of the regular expression you have built, and gets updated every time you change something in the conditions. You can also further customize the RegEx by using the IgnoreCase check box, which is selected by default, and ignores uppercase or lowercase letters.
Clicking Save closes the wizard and configures the activity, which is now ready to be used.
Updated 6 months ago