Eric Amick <[EMAIL PROTECTED]> wrote:

On Sat, 28 Feb 2004 12:00:15 -0800, ["Jeff Zanzinger" <[EMAIL PROTECTED]>] wrote:

How can I match the "&" symbol?

$_ = "test & test";
s/&/and/; # expect test and test but get test & test

The code in your message works fine. (Yes, I actually ran it....) Why don't you post the *exact* code that isn't working instead? The ampersand is not special in regular expressions, so the backslash suggested in other replies is pointless.

I second this. I use the following in my code: $tempName =~ s/&/and/g; # replace all '&' with 'and'

and it is working fine.

Regards,


_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to