This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
It is difficult to see in the expression, but there is a space before the ?.* Alteryx allows a space, but I usually use \s instead as it makes the expression clearer. So this is really two separate parts of the expression:
\s? find the first whitespace character
.* match everything (until the named group that follows)
(^|\s) ^ beginning of line
\s whitespace character
So the second RegEx is finding where from the beginning of the line or after a space find the word APT or FLAT or APARTMENT or Suite (all case insensitive) followed by any characters until followed by a digit or a word. If that specific pattern is found, then replace it with blank.
(.*?) in the third RegEx is a named group to find all characters until the next part of the RegEx expression. In this case find all characters until the next named group which is one or more digits followed by a single word character if there is one
For more information on Perl syntax, I find this Alteryx Community link to be helpful: