Regular expressions, commonly known as RegEx and pronounced as(Rej-Ex), are a sequence of characters that allows the user to create patterns that help match, locate, and manage any string data.
In Alteryx, we can use the RegEx tool to replace, tokenize, parse, and match string values.
What do these terms mean? Here are the definitions:
Parse: Separate the expression into new columns and set the name, type and size of these new columns.
Match: Append a column containing a number:
· True if the expressions match
· False if the expressions do not match
Replace: Replace an expression with another text.
Tokenize: Split a column with a regex function.
I am going here to list some of the important symbols that are used in Regex functions.
Asterisk – The Star (*): Is used to match zero or more of the preceding character. So, it is an expression that matches everything. You should use the dot (.) with the asterisk to match any character (.*).
The Plus character (+): in a regular expression the plus is used to match a character one or more times. For example W+ matches one or more of the letter W.
The Question Mark – The optional character (?): if you use the question mark, then you mean that the preceding character or pattern is totally optional.
The Curly Brackets ({}): the curly brackets are used to specify a specific number of instances of the preceding character or pattern. Example: “\a{2}” this expression will match “aa”.
