escaping question mark in regex javascript

You need to escape it with two backslashes

\\?

See this for more details:

http://www.trans4mind.com/personal_development/JavaScript/Regular%20Expressions%20Simple%20Usage.htm

Leave a Comment