REGEXP
Command: #regexp {string} {expression} {true} {false}
Compares the string to the given regular expression.
Variables are stored in &1 to &99 with &0 holding the matched substring.
^ force match of start of line.
$ force match of end of line.
\ escape one character.
%1%99 lazy match of any text, available at %1%99.
%0 should be avoided in triggers, and if left alone lists all matches.
{ } embed a raw regular expression, matches are stored to %1%99.
%!{ } embed a raw regular expression, matches are not stored.
[ ] . +  ( ) ? * are treated as normal text unlessed used within
braces. Keep in mind that { } is replaced with ( ) automatically
unless %!{ } is used.
Of the following the (lazy) match is available at %1%99 + 1
%a match zero to any number of characters except newlines.
%A match zero to any number of newlines.
%d match zero to any number of digits.
%D match zero to any number of non digits.
%p match zero to any number of printable characters.
%P match zero to any number of non printable characters.
%s match zero to any number of spaces.
%S match zero to any number of non spaces.
%u match zero to any number of unicode characters.
%U match zero to any number of non unicode characters.
%w match zero to any number of word characters.
%W match zero to any number of non word characters.
If you want to match 1 digit use %+1d, if you want to match between 3
and 5 spaces use %+3..5s, if you want to match between 0 and 1 word
characters use %+0..1w
%+ match one to any number of characters.
%? match zero or one character.
%. match one character.
%* match zero to any number of characters.
%i matching becomes case insensitive.
%I matching becomes case sensitive (default).
The match is automatically stored to a value between %1 and %99
starting at %1 and incrementing by 1 for every regex. If you use
%15 as a regular expression, the next unnumbered regular expression
would be %16. To prevent a match from being stored use %!*, %!w, etc.
Example: #regexp {bli bla blo} {bli {.*} blo} {#showme &1}
Related: case, default, else, elseif, if and switch.
