The regular expression: (?-imsx:(\w+)\$=\$(\w+)\$=\$(\w+)) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- ( group and capture to \1: ---------------------------------------------------------------------- \w+ word characters (a-z, A-Z, 0-9, _) (1 or more times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of \1 ---------------------------------------------------------------------- \$ '$' ---------------------------------------------------------------------- = '=' ---------------------------------------------------------------------- \$ '$' ---------------------------------------------------------------------- ( group and capture to \2: ---------------------------------------------------------------------- \w+ word characters (a-z, A-Z, 0-9, _) (1 or more times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of \2 ---------------------------------------------------------------------- \$ '$' ---------------------------------------------------------------------- = '=' ---------------------------------------------------------------------- \$ '$' ---------------------------------------------------------------------- ( group and capture to \3: ---------------------------------------------------------------------- \w+ word characters (a-z, A-Z, 0-9, _) (1 or more times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of \3 ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});
In reply to Re: regex; how it works
by codeacrobat
in thread regex; how it works
by sathiya.sw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |