Syntactic Confectionery Delight | |
PerlMonks |
Re: Regex to ignore commentby Laurent_R (Canon) |
on Oct 20, 2015 at 17:18 UTC ( [id://1145462]=note: print w/replies, xml ) | Need Help?? |
I am not sure that I understand what you're trying to do, but the simplest way to include comments in a regex is to use the /x modifier: anything in your regex from the (unescaped) # to the end of the line will be a comment.
Otherwise, you might also use the (?#comment) construct, but, frankly, the /x modifier is more practical.
In Section
Seekers of Perl Wisdom
|
|