in reply to Re: comment inside perl regular expression
in thread comment inside perl regular expression

Or by doing something really wacky:
/(?:(*FAIL)\QThis is a comment\E)?PATTERN/
Not something I recommend doing though.

Replies are listed 'Best First'.
Re^3: comment inside perl regular expression
by moritz (Cardinal) on Mar 13, 2009 at 13:01 UTC
    If you want inline comments, you can use (?# comment ) instead, which is less wacky, but I still think that it's no great thing in terms of readability.