Re: [MacPerl-AnyPerl] regexp matching newline
[email protected] (Bart Lateur) Sun, 17 Aug 2003 03:00:31 +0200
| Newsgroups | perl.macperl.anyperl |
|---|---|
| Organization | MediaMind |
| Message-ID | <[email protected]> |
On Wed, 13 Aug 2003 19:34:51 +0200, allan juul wrote: >i have a problem removing blank lines in one regexp. my string will be >slurped so it will contain newlines as examplified below: > >my $str = qq(test0; >test1; >//test2; >test3;); > >$str =~ s,^.*//.+;$,,igm; > >print $str; > >__END__ > > > >this is the result: >--------------------- >test0; >test1; > >test3; > > > >i want t achieve: >---------------------- >test0; >test1; >test3; $str =~ s,^.*//.+;\n,,igm; -- Bart.