javascript - SyntaxError: Invalid regular expression: missing / -


According to my reqx it seems to work, but when I implement it in my javascript

var prefix = hash.replace (/ \ / | # / g, '');

I will get the following error: Syntax Error: Invalid Regular Expression: Missing / Psychic Debugging: Your code is not in plain JavaScript or HTML file, but from a scripting language Is being printed.

which is a comment character # / g, ''); The piece is considered as a comment in your script.

You must add some quotation to ensure that the whole line is printed. / P>

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -