I tend to comment regexps like this:
$path=~/^\s*([\w-]+) # elt \s*\[\s*\@ # [@ ([\w-]+) # att $1 \s*=\s*(["']) # = " (or ',) $2 (.*?) # value $3 \3\]\s*$/gx) # "] (or ')
It works very well for moderately complex regexps.
In reply to RE: Re: Regexes vs. Maintainability
by mirod
in thread Regexes vs. Maintainability
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |