Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Some perl regex help

Alexander Burrows

2008-06-30

Replies:

Author LoginPost Reply

Hello again all. Been a while since I've posted here but needed some help on
a regex I was trying to write.

$line =~ tr/(\(|\)|<|>)/(\&#40;|\&#41;|\&lt;|\&gt;)/g;

This does not work at all in perl so I found so I replaced the tr with s and
the search part works as expected but the replace does not. I've been trying
to read around forums and regex documents for perl but they seem unorganized
and cryptic. So any help would be appreciated.

-Alexander
--
Sent from the mod_perl - General mailing list archive at Nabble.com.

©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.