The problem is pretty simple really. This will do it:
/^(?!.*foo\.htm$).*\.htm$/i.test("/foo.htm"); // returns false
More Related Contents:
- Regex negative lookbehind not valid in JavaScript [duplicate]
- Javascript regex (negative) lookbehind not working in firefox
- javascript regex
- How can I use Unicode-aware regular expressions in JavaScript?
- How to use JavaScript regex over multiple lines?
- javascript regex – look behind alternative?
- Get Substring between two characters using javascript
- Javascript Regexp dynamic generation from variables? [duplicate]
- Fastest way to check a string contain another substring in JavaScript?
- Check if a string is html or not
- How to test valid UUID/GUID?
- Capture value out of query string with regex?
- Get URL from background-image Property
- Regular expression for all printable characters in JavaScript
- Regex currency validation
- Wrap tags around http text
- regex street address match
- regex javascript to match both RGB and RGBA
- jQuery Youtube URL Validation with regex
- Replace function not replacing [duplicate]
- regex pattern to match the end of a string
- How to remove square brackets in string using regex?
- Regular expression with the cyrillic alphabet
- why does my javascript regex.test() give alternating results [duplicate]
- Regular expression for only characters a-z, A-Z
- Are the angle brackets (< or >) special in a regular expression?
- Regex for checking that at least 3 of 4 different character groups exist
- Convert string to Pascal Case (aka UpperCamelCase) in Javascript
- Regex – Repeating Capturing Group
- How do you split a javascript string by spaces and punctuation?