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 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'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:...
function fuzzQuery(rawQuery) {     re = /(?=[\(\) ])|(?<=[\(\) ])/;          strSplit = rawQuery.split(re);      alert(strSplit); };   Does not work (no dialog box).   I've check the expression at http://rubular.com/ and it works as intended....
I have this line:  OUT = br0 SRC = 222.187.221.84 DST = 192.168.1.20 LEN = 60 OUT = br0 SRC = 222.187.221.84 DST = 192.168.1.20 LEN = 60 OUT = br0 SRC = 222.187.221.84 DST = 192.168.1.20 LEN = 60   How can I only get src = (ipaddress) and just get th...
I'm trying to write a regex with a negative lookahead that detects files which end with .apk but not with -unaligned.apk. Here it is.  /(?s)^((?!\-unaligned).)*\.apk$/   However, when I use it in Node (or in the Chrome developer tools, too), it t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.