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
More Related Contents:
- Javascript Array – Split string at numbers [closed]
- What’s the best way to validate an email address in JavaScript?
- Why do regex constructors need to be double escaped?
- Why this javascript regex doesn’t work?
- How can I match a whole word in JavaScript?
- How do I get the YouTube video ID from a URL?
- How can I match overlapping strings with regex?
- Javascript and regex: split string and keep the separator
- Javascript Regex: How to put a variable inside a regular expression? [duplicate]
- Javascript RegExp + Word boundaries + unicode characters
- How to escape regular expression special characters using javascript? [duplicate]
- How to find indices of all occurrences of one string in another in JavaScript?
- How can I match multiple occurrences with a regex in JavaScript similar to PHP’s preg_match_all()?
- Differences between Javascript regexp literal and constructor
- utf-8 word boundary regex in javascript
- Works in Chrome, but breaks in Safari: Invalid regular expression: invalid group specifier name /(?
- Javascript – return string between square brackets
- How to prevent Javascript injection attacks within user-generated HTML
- How to pull the file name from a url using javascript/jquery?
- Regular expression for all printable characters in JavaScript
- Regex currency validation
- Wrap tags around http text
- Why can’t I use accented characters next to a word boundary?
- Trim spaces from start and end of string
- How to convert a Title to a URL slug in jQuery?
- Optimize long lists of fixed string alternatives in regex
- Replace certain arabic words in text string using Javascript
- Regular expression for number with length of 4, 5 or 6
- Is there a way to measure string similarity in Google BigQuery
- Regex – Repeating Capturing Group