javascript - RegExp String replace Error -


I want to change all occurrences of "+" in a string with a location

  Query = Query.replace (New RegExp ("+", "g"), "");   

But above this, "Syntax error: Invalid quantifier" raises the error Why am I wrong here?

How about

  query.replace (/ \ + / G, "");   

You have to backslash +

Comments

Popular posts from this blog

sql - Return Function using Cursor -

javascript - Is there any way to add a new parameter to a function programmatically? -

sql server - How to use pivot in this table -