titanium javascript error in regex compiler i think

You must Login before you can answer or comment on any questions.

hi all

got this code here:

return data.replace(/\//g,"!!!").replace(/=/g,"!!").replace(/+/g,"@@");
it is used to clean up this:
wFaSkAddNkojBfAX+nkqEdlXPit5LKVdVT+1iAAgISDWtf+QMWqEQcKNmSIEnf5fJW8RT6QgX2UL/eZkz2XlDeU9Z6SJyDQ2+C31WbhFgcyAelE=
but in the info i get this as an error and the code fails to work:
line = 72;
message = "Invalid regular expression: nothing to repeat";
name = SyntaxError;
sourceId = 237349720;
sourceURL =
really annoying and seems to be a problem with actually using regex, your advice much appreciate.

cheers

dave

— asked 3 years ago by David Parker
2 Comments
  • on breaking things down i find it is this .replace(/+/g,"@@") that is causing the error there are multiple + chars in this string

    — commented 3 years ago by David Parker

  • nope sorry the + needed to be escaped just been a bit dim today durrrr

    — commented 3 years ago by David Parker

Your Answer

Think you can help? Login to answer this question!