in reply to How to parse this information out?
This is what I came up with.
while ( $text =~ m{ (?:[ ]{2}|\n|\A) # Two spaces, newline, or string +start ( # start of phrase (?:\S+\s)* # nonspaces + ONE space, repeated NOTICE # literal NOTICE (?:\s\S+)* # one space + nonspaces, repeated ) # end of phrase (?:[ ]{2}|\n|\z) # two spaces, newline, or string +end }xmsg ) { print $1, "\n"; }
|
|---|