GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:
This works, but every now and again $1 holds some br's (sorry --if I type it like a tag, it's interpretted as such). Sometimes zero, sometimes ten. I know I can add a line to it and easily take them out, but is there an easier 1-line solution? I've been doing Perl for over a year now... it's probably time I got a bit funkier w/ my regex's. I thought this would work, but didn't.( $result = $htmlline ) =~ s/<tag marker>(.+?)</td>/$1/;
( ( $result = $htmlline ) =~ s/<tag marker>(.+?)</td>/$1/ ) =~ s/<br>/ +/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex help
by JediWizard (Deacon) on Jun 27, 2005 at 01:44 UTC | |
|
Re: regex help
by Samy_rio (Vicar) on Jun 27, 2005 at 01:52 UTC | |
|
Re: regex help
by GrandFather (Saint) on Jun 27, 2005 at 01:47 UTC | |
|
Re: regex help
by davidrw (Prior) on Jun 27, 2005 at 01:56 UTC | |
by GaijinPunch (Pilgrim) on Jun 27, 2005 at 02:11 UTC | |
|
Re: regex help
by injunjoel (Priest) on Jun 27, 2005 at 02:43 UTC | |
|
Re: regex help
by GrandFather (Saint) on Jun 27, 2005 at 01:55 UTC |