I want to match all strings ending in ".htm" unless it ends in "foo.htm".  I'm generally decent with regular expressions, but negative lookaheads have me stumped.  Why doesn't this work?  /(?!foo)\.htm$/i.test("/foo.htm&...
I'm reading Douglas Crockfords Javascript: The Good Parts, I just finished the regular expressions chapter. In this chapter he calls JavaScript's \b, positive lookahead (?=) and negative lookahead (?!) "not a good part"  He explains t...
I've tried to use lookahead/lookbehind in JavaScript (described at the Regular-Expressions.info) and figured out they're not supported.  What I'm trying to do actually, is to catch a dar, which isn't followed by win. So, a string darb...
I've been wrestling with this for a while and can't figure it out. I see in Regex to match string containing two names in any order that lookarounds can be used to look for words occurring in any order. I added some additional groups to the e...
I have this user price input that I want to allow 0, 1 or 2 decimal digits.    I'm using comma for decimals. I'm not using nor allowing thousand separators.   QUESTION:  I want to replace the input if the user enters a third decimal digit.  S...
I am trying to split string in 3 different parts with regex.  I can only get function parameters from string but i also want to other parts of the string  const regex = /(\(.*?\))+/g; const sampleString = 'collection.products(take:12|skip:16)'...
This question already has answers here:...
I do have the following RegExp in the current web application.  function myCyrillicDigitsAndSpaceValidator(text){     return XRegExp("^[\\p{Cyrillic}0-9]+").test(text); }   As you can see I use XRegExp javasciprt library. Currently, this regx...
I'm trying to solve a string matching problem with regexes. I need to match URLs of this form:  http://soundcloud.com/okapi23/dont-turn-your-back/   And I need to "reject" URL of this form:  http://soundcloud.com/okapi23/sets/happily-reve...
I have a string that contains single, double, and escaped quotations:     Telling myself 'you are  \'great\' ' and then saying "thank you" feels "a \"little\" nice"   I would like a single regex to pull out:...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.