Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Search and Replace Regex
pacer11
Does anyone know what regex to use when trying to match this pattern:
THE_END("123")
I have tried doing the following patterns with no success:
$newString =~ s#THE_END\Q(\"123\")\E#THE_BEGINNING("456")#
$newString =~ s#THE_END\Q("123")\E#THE_BEGINNING("456")#
$newString =~ s#THE_END\(\"123\"\)#THE_BEGINNING("456")#
Any Feedback is appreicated!
Find more posts tagged with
Comments
jbonifaci
With the example you've given, all 3 should work. Maybe you could post your exact code and someone can spot what is amiss?
~Jeff
Adam Stoller
s|THE_END\("123"\)|THE_BEGINNING("456")|;
Works for me
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
No need to escape the double-quotes.
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
By the way, I miss Unix terribly.
pacer11
Thanks everyone, my problem was escaping the double quotes. Once I took this out it worked fine.
Thanks again.
jbonifaci
That's strange, it really shouldn't have mattered. You didn't need to escape them, but escaping them shouldn't have changed anything. Glad you got it working though!!!
~Jeff