in reply to string replacement question
You say :
I want to replace "C:\Program Files\180searchassistant\salmhook.dll" with "C:\Program Files\180searchassistant\salmhook.dll"
But these two string are identical ?!
As i understand it you have a problem with the backslash. It's not a real problem : escape the backslash
Well, you can do this a gazillion ways there's no problems with the backslash ...# note the use of single quotes $string = 'c:\foo\bar\weird program name.exe' ; # using another regexp separator for readability $string =~ s[foo\\bar][foo\\baz] ; # Or with / as the separator $string =~ s/foo\\bar/foo\\baz/ ;
Now about replacing japanese characters with a regexp, as i understand this will call for unicode regexp. Supersearch will give you some result.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: string replacement question
by ww (Archbishop) on Dec 08, 2005 at 14:35 UTC |