[thesite] Print version of evolt.org articles
Dean Mah
dsmah at home.com
Thu Jul 19 17:03:03 CDT 2001
.jeff writes:
> mind sharing the regex/query you had in mind? just for curiosity
> sake.
I'm using:
m|<pre>(.+?)</pre>|gisc
to find text within pre tags.
Then doing:
$new_pre_body =~ s/</</g;
$new_pre_body =~ s/>/>/g;
$new_pre_body =~ s/\"/"/g;
to escape <, >, and ".
Then doing:
$new_body =~ s/\Q$pre_body\E/$new_pre_body/;
to replace the old text within the pre tags with the new one.
Does that look right?
Dean
More information about the thesite
mailing list