SyntaxError: Invalid regular expression: missing /
javascript, regex
Solution
Psychic debugging: Your code isn't in a plain JavaScript or HTML file, but is being printed from a scripting language in which `#` is a comment character. The `#/g, '');` piece is being treated as a comment in your script.
You need to add some quotes to ensure that the whole line gets printed.
Problem
According to http://www.regexr.com/38o5d my reqex seems to work, but when I implement it into my javascript `var prefix = hash.replace(/\/|#/g, '');` I'll get the following error: SyntaxError: Invalid regular expression: missing /