Hello,

I'm trying to do a search and replace on a file (specifically the word transformC). A cut down version of the file is below:


blahblah -blah blah -blah blah -blah $blah -blah "Ground"
-c "blah transformC" transformC; blahblah
-af transformC "blah" ($blah)
-af AtransformC "blah" ($blah)
-af transformC_2 "blah" ($blah)



a pattern like this seems to take care of this: $line =~ s/([\s"])transformC([\W|\D])/$1TRANSC$2/g;


giving


blahblah -blah blah -blah blah -blah $blah -blah "Ground"
-c "blah TRANSC" TRANSC; blahblah
-af TRANSC "blah" ($blah)
-af AtransformC "blah" ($blah)
-af transformC_2 "blah" ($blah)


however I want a pattern that will NOT change "blah transformC", but will still replace transformC; "transformC" transformC

any ideas?

thanks,

martin


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to