How to use Regular Expressions in Portrait Interaction Optimizer selections

Product Feature: Selection design (HQ)
Portrait Interaction Optimizer can use Regular Expressions when matching data to create Selections. They are not to be confused with the much simpler 'wildcard' searching.

Regular Expressions are for matching patterns in strings. A regular expression is a specially formatted string that represents a pattern of characters. For example, the regular expression "ar{1,2}y?$" represents "the letter 'a', followed by one or two 'r's, possibly followed by 'y', followed by the end of a string." (That pattern occurs in strings like "marry" and "jar" - but not in "may" or "jars.")

A regular expression consists of basic components combined using operators.

If a regular expression (other than a sub-expression) could match more than one portion of a string, it always matches the leftmost, longest candidate portion. For example, the regular expression "a[^ad]+" (representing "the letter 'a', followed by one or more letters other than 'a' or 'd'") matches "adaptationally." The matched portion is not "ation," as there are candidate portions further to the left. Neither is it "ap," because, although there are no candidates further to the left, there is a longer candidate portion starting at the same character.

To test a string for a regular expression match, use the is like or is not like comparisons in the Selection Designer.
Regular expressions in Portrait Interaction Optimizer are a version of .Net 4 Regular Expressions.

More details and several examples can be found in your Portrait HQ User Guide documentation. You can find the latest version of it online here. Please search the document for the heading "Regular expressions (IO)".
UPDATED:  March 28, 2017