R (Chandra) Chandrasekhar wrote:
I am trying to change occurrences of & into &.

Are you sure that's what you want to do? In an HTML context, it's more common to do that only when & is not already the beginning of a character entity, such as '&' or '"' or '<' etc.

    s/&(?!(?:[a-z]+|#[0-9]+);)/&/g;

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to