Gossamer Forum
Home : General : Perl Programming :

Re: [Andy] pattern matching prblem

Quote Reply
Re: [Andy] pattern matching prblem In reply to
In Reply To:
Hi. You need to escape things like < and >. Something like this should work;

Code:
$rec{'Text'} =~ s|\<pre\>(.*?)\<br\>(.*?)\</pre\>|<pre>$1 $2</pre>|gis;

Thanks Andy, but it doesn't. And just above it, I have:

Code:
$rec{'Text'} =~ s|</blokrechts>|</span>|gis;
$rec{'Text'} =~ s|<pre>(.*?)<br>(.*?)</pre>|<pre>$1 $2</pre>|gis;

The first one works fine so I guess it's something to do with the way I try to get rid of the <br>'s...
Subject Author Views Date
Thread pattern matching prblem Lex 9241 Jun 17, 2004, 4:21 AM
Thread Re: [Lex] pattern matching prblem
Andy 9154 Jun 17, 2004, 6:11 AM
Thread Re: [Andy] pattern matching prblem
Lex 9151 Jun 17, 2004, 7:16 AM
Thread Re: [Lex] pattern matching prblem
Andy 9140 Jun 17, 2004, 7:35 AM
Thread Re: [Andy] pattern matching prblem
Lex 9167 Jun 17, 2004, 8:40 AM
Thread Re: [Lex] pattern matching prblem
yogi 9143 Jun 18, 2004, 12:44 AM
Post Re: [yogi] pattern matching prblem
Lex 9092 Jun 18, 2004, 1:17 AM
Post Re: [Andy] pattern matching prblem
BlueBottle 9061 Jul 17, 2004, 7:14 AM