Correct me if I am wrong but the only time you need to escape a backslash is if your regexpr is started and terminated with it. Since you are using {} I don't think you need to do that.
> -----Original Message----- > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 13, 2002 8:25 AM > To: [EMAIL PROTECTED] > Subject: Re: Regex question > > > Colin Johnstone wrote: > > > > Gidday all, > > Hello, > > > I have a paragraph of text, I want to convert any double > quotes around > > quoted text to \" is this the correct reg ex > > > > $paragraph =~ s{\"}{\\"}g; > > Yes that will work although you don't need to backslash the > quote in the regular expression. > > $ perl -le'$_ = q[one "two" three]; s{"}{\\"}g; print' > one \"two\" three > > > > John > -- > use Perl; > program > fulfillment > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]