I want to use "/" (forward slash) in string in script but I am getting following error.
I have following applescript to replace content in file.
Syntax: do shell script "perl -pi -e 's/oldtext/newtext/g' " & quoted form of (POSIX path of file)
Following code is working because there is not special symbol.
do shell script "perl -pi -e 's/myname/yourname/g' " & quoted form of (POSIX path of file_tgt)
But following code is not working as it has "/".
do shell script "perl -pi -e 's/</b>/</b>/g' " & quoted form of (POSIX path of file_tgt)
above code contain </b>
throws following error:
Expected “"” but found unknown token.
if I add <\/b>
, it throw following error.
Unknown regexp modifier "/b" at -e line 1, at end of line
Search pattern not terminated at -e line 1.
Can anybody please suggest a solution to me?