![]() |
Pattern Match Question..
I want to replace all instances of the combination of \" with \"
Using the Regex code below, I end up replacing ALL " with &guot; and all \" with \&guot; How can I make it ONLY replace the combination of \" ? $TextBlockToConvert =~ s/\"/\quot;/g; NOTE: The combination of \" may or may not have other characters butting up against either or both sides of it. Thanks, -- .... `·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney |
Re: Pattern Match Question..
Rodney wrote:
> > I want to replace all instances of the combination of \" with \" > > Using the Regex code below, I end up replacing ALL " with &guot; and all > \" with \&guot; > How can I make it ONLY replace the combination of \" ? > > $TextBlockToConvert =~ s/\"/\quot;/g; The backslash character is special in double quoted strings so you have to escape it if you want a literal backslash character. $TextBlockToConvert =~ s/\\"/"/g; John -- use Perl; program fulfillment |
Re: Pattern Match Question..
That did it perlfectly!
Thanks John. -- .... `·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney |
| All times are GMT. The time now is 01:05 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.