in reply to Re: Regex question - either starts, or has newline prefixing?
in thread Regex question - either starts, or has newline prefixing?
my @headers; while ($post->{post_message} =~ m|(?:\n)?\=\=([a-z0-9_ &\[\]ÀÂÄàâä +ÇçÉÊÈËéêèëÏÌÎïìîÖÔÒöôòÜÛÙüûùA-Z?!;«»()"\s]+)\=\=|g) { my $section = get_section_code($1,$post->{post_message}); my @subheaders; while ($section =~ m|\n\=\=\=([a-z0-9_ &\[\]ÀÂÄàâäÇçÉÊÈËéêèëÏÌ +ÎïìîÖÔÒöôòÜÛÙüûùA-Z?!;«»()"\s\-]+)\=\=\=|g) { push @subheaders, $1; } push @headers, { Section => $1, SubLoop => \@subheaders }, }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex question - either starts, or has newline prefixing?
by BioLion (Curate) on Jul 13, 2009 at 12:53 UTC |