You can escape it like this.
/\//ig; // Matches /
or just use indexOf
if(str.indexOf("https://stackoverflow.com/") > -1)
More Related Contents:
- Find particular string from URL in JavaScript
- Regex for Email Address along with name format [duplicate]
- Negative lookbehind equivalent in JavaScript
- Remove not alphanumeric characters from string
- Convert camelCaseText to Title Case Text
- Regular expression not working for at least one European character
- Regular expression to match A, AB, ABC, but not AC. (“starts with”)
- How to parse a URL?
- List of all characters that should be escaped before put in to RegEx?
- Match any non-word character (excluding diacritics)
- Combining regular expressions in Javascript
- How can I select an element by ID with jQuery using regex?
- Why does String.match( / \d*/ ) return an empty string?
- Regex to Match Symbols: !$%^&*()_+|~-=`{}[]:”;’?,./
- Regex to replace everything except numbers and a decimal point
- RegEx: How can I match all numbers greater than 49?
- How do I split a string by whitespace and ignoring leading and trailing whitespace into an array of words using a regular expression?
- In a regular expression, match one thing or another, or both
- Regex only capturing last instance of capture group in match
- (*SKIP)(*FAIL) workaround in JavaScript RegExp
- What are non-word boundary in regex (\B), compared to word-boundary?
- What is the need for caret (^) and dollar symbol ($) in regular expression?
- Replacing accented characters with plain ascii ones [duplicate]
- Javascript RegExp for splitting text into sentences and keeping the delimiter
- Best way to parse HTML in Javascript
- How to insert space every 4 characters for IBAN registering?
- Regular Expression Pattern With A Variable
- How can I use regex to get all the characters after a specific character, e.g. comma (“,”)
- Regex – Repeating Capturing Group
- How do you split a javascript string by spaces and punctuation?