anek77713 has asked for the wisdom of the Perl Monks concerning the following question:
what exactly does this regex? $text =~ s/(=head1 .*)\n\n=head2 \*{3}/$1/g;sub process_chapter { my ($path, $sections_href) = @_; my $text = read_file( $path ); $text =~ s/^L<(\w+)>/insert_section( $sections_href, $1, $path )/e +mg; $text =~ s/(=head1 .*)\n\n=head2 \*{3}/$1/g; return $text; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex help!
by rjt (Curate) on Jul 12, 2013 at 09:51 UTC | |
by anek77713 (Acolyte) on Jul 12, 2013 at 09:58 UTC | |
by rjt (Curate) on Jul 12, 2013 at 10:14 UTC | |
|
Re: regex help! (regexplain)
by Anonymous Monk on Jul 12, 2013 at 09:59 UTC | |
by Anonymous Monk on Jul 12, 2013 at 10:07 UTC | |
by anek77713 (Acolyte) on Jul 12, 2013 at 10:03 UTC |