in reply to Regex assistance, please.
elsif ($code_s =~ m{\G((?:.*$)*)(?!\s###+)}cgm) { #!!!!! # $1 only captures a single line # why not multiple lines complete with their \n?
Because the dot . doesn't match the newline character. Unless you add the /s modifier to your regex.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex assistance, please.
by clueless newbie (Curate) on Oct 21, 2012 at 17:57 UTC | |
by moritz (Cardinal) on Oct 22, 2012 at 05:04 UTC |