Posted on 2011-05-11
I have this text:
OBX|9|NM|656158^PLT||225|10\S\9/L|140-444|||U|F|||20110503145020|Undefined Providence Location|^BOLLETIO^TONI^^^^^^&&^^^^^&&";
I need to replace the \S\ that appears here: 10\S\9/L with a caret so I'd have 10^9/L
I want to get rid of all of the \S\ and replace with ^ so I need a global replacement function.
I tried this: tmpStr = tmpStr.replace(/\\S\\/g,"^");
which gets rid of the \ but not the S.