From: Jarkko Hietaniemi Date: Wed, 19 Dec 2001 15:59:02 +0000 (+0000) Subject: One more embedded (?sx) de-embedded, from Wolfgang Laun. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a41e59e351b87831971ce20731c9def439ae1615;p=p5sagit%2Fp5-mst-13.2.git One more embedded (?sx) de-embedded, from Wolfgang Laun. p4raw-id: //depot/perl@13807 --- diff --git a/ext/B/B/Assembler.pm b/ext/B/B/Assembler.pm index 10ae81b..4db23f1 100644 --- a/ext/B/B/Assembler.pm +++ b/ext/B/B/Assembler.pm @@ -160,9 +160,8 @@ sub uncstring { sub strip_comments { my $stmt = shift; # Comments only allowed in instructions which don't take string arguments + # Treat string as a single line so .* eats \n characters. $stmt =~ s{ - (?sx) # Snazzy extended regexp coming up. Also, treat - # string as a single line so .* eats \n characters. ^\s* # Ignore leading whitespace ( [^"]* # A double quote '"' indicates a string argument. If we @@ -170,7 +169,7 @@ sub strip_comments { ) \s*\# # Any amount of whitespace plus the comment marker... .*$ # ...which carries on to end-of-string. - }{$1}; # Keep only the instruction and optional argument. + }{$1}sx; # Keep only the instruction and optional argument. return $stmt; }