Because of ©
I don't want that to get changed. In the end, something like:
s/&(?!\w+|[#\d]+;/&/g
Works. That might not be quite right, but I think you know what I'm
getting at.
Rob Dixon wrote:
Jenda Krynicky wrote:
Toby Stuart wrote:
Try this one:
s/&(?!\w+;)/&/g
Proble
Jenda Krynicky wrote:
>> Toby Stuart wrote:
>>> Try this one:
>>>
>>> s/&(?!\w+;)/&/g
>
> Problem is that this will break things like
> @
>
Why not just:
s/&(?!amp;)/&/g
i.e. change every ampersand that isn't followed by 'amp;' into &
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
> Toby Stuart wrote:
> >Try this one:
> >
> > s/&(?!\w+;)/&/g
Problem is that this will break things like
@
Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
--
Whew! That's the same one I finally came up with. Glad to see I was on
the right track. The original solution didn't work at all.
Toby Stuart wrote:
-Original Message-
From: Ben Siders [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 7:38 AM
To: Perl
Subject: Escaping Am
From: Ben Siders <[EMAIL PROTECTED]>
> I've got a real easy one here (in theory). I have some XML files that
> were generated by a program, but generated imperfectly. There's some
> naked ampersands that need to be converted to &. I need a regexp
> that will detect them and change them. Sounds
> -Original Message-
> From: Ben Siders [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 7:38 AM
> To: Perl
> Subject: Escaping Ampersands in XML
>
>
> I've got a real easy one here (in theory). I have some XML
> files that
> were generated by a program, but generated im