“Regular expression” is one of the patterns that you can select on the Match panel. With this pattern you can insert actual regular expression code into your regular expression.
One handy aspect of the “regular expression” pattern is that it accepts a regular expression in any of the regular expression flavors that RegexMagic supports. This flavor can be a different one than the regex flavor used by the application you have selected on the Regex panel. RegexMagic automatically converts the regular expression from the flavor you specified in the pattern to the flavor selected on the Regex panel.
In this example, we’ll use this ability to take a regular expression that you might have found in old source code that was created for a legacy regular expression flavor and convert it to a modern flavor. You can find this example as “Pattern: regular expression” in the RegexMagic library.
\(\(I\|you\|we\|they\)\s\+love\|s\?he\s\+loves\)\s*reg\(ular expressions\?\|ex\(p\|es\)\?\)
((I|you|we|they)[\t\n\v\f\r ]+love|s?he[\t\n\v\f\r ]+loves)[\t\n\v\f\r ]*reg(ular expressions?|ex(p|es)?)
Required options: Case insensitive; Exact spacing.
Unused options: Dot doesn’t match line breaks; ^$ don’t match at line breaks; Numbered capture.