Examples

Example 1: Matching Specific Text

The most basic use of regex is to match on any text that contains a specific subportion of text. This can be done easily with the Text block. For example, if you want to match on any text that contains “apple”, it would like the following blocky expression:

Note: the Text block is always case sensitive, so be careful with what you type!


Example 2: Matching The Start of Text

Suppose you only want text that starts with “a”. The blocky expression would look like:


Example 3: Matching The End of Text

Suppose you only want text that ends with “b”. The blocky expression would look like:


Example 4: Matching Repeating Text

Suppose you want text that contains any number of the Text “caw ” back-to-back. The blocky expression would look like:


Example 5: Matching Whitespace

Suppose you want text that contains any amount of any kind of whitespace between an “a” and a “b”. The blocky expression would look like:


Example 6: Matching Specific Number of Characters

Suppose you want text that has at least 5 (but no more than 10) “a” in a row and ends with “b”. The blocky expression would look like:


Example 7: Matching This OR That

Suppose you want text that starts with “c” or ends with “d”. The blocky expression would look like:


Example 8: Matching Number But Later

Suppose you want text that contains a number anywhere that isn’t the first character of the text. There are multiple ways to solve this. One solution might look like:


Example 9: Matching No Numbers at All

Suppose you want text that contains no numbers and ends with “c”. The blocky expression would look like:


Example 10: Matching a Dynamic Sentence

Suppose you want text that starts with “This”, ends with a period, contains no capital letters after “This”, and contains a single number somewhere. One solution might look like: