in reply to Re: Regex to strip comments
in thread Regex to strip comments
String literals aren't parsed inside of comments, as your code seems to assume. It is only the string literals outside of comments where '/*' needs to be ignored. (And, despite the OP's claim, '*/' in a string literal isn't a problem.)
[Update: After posting, I see that your node, despite being earlier, is listed below my other node. So it must have a negative rep. FYI, I didn't down-vote it. I guess I figured posting the correction might well be punishment enough. :) ]
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Regex to strip comments (out not in)
by BrowserUk (Patriarch) on Oct 01, 2012 at 05:31 UTC | |
by tye (Sage) on Oct 01, 2012 at 14:53 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2012 at 18:20 UTC | |
by tye (Sage) on Oct 01, 2012 at 19:18 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2012 at 19:38 UTC |
In Section
Seekers of Perl Wisdom