Regexp::Common::comment doesn't do proper tokenizing. IIRC, it will not catch the cases you presented correctly. I remember seeing a regex for catching C-style comments correctly (don't remember where, sorry), and it's quite ugly (but not as bad as the e-mail address regex).
----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.
In reply to Re^2: RegEx - comments should not matches
by hardburn
in thread RegEx - comments should not matches
by Chief of Chaos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |