I have this regex:  /(((\w+)|(\.\w+)|(\#\w+)|\*)(\[(.+(=".+"|\*".+"|\^".+"|))\])?(::|:)?)+(?=[ \S]*\{)/gm  Which I am trying to use to match CSS selectors. Consider this pseudo-code CSS input:  .main {   property: value; }  .o...
I have recently asked a question regarding an error I have been getting using a RegExp constructor in Javascript with lookbehind assertion.  What I want to do it, to check for a number input bigger than 5 preceded by an odd number of backslash, in ot...
I want to escape all quotes that comes only after the text H1:  For instance, :  H1: "text here"   should become:  H1: "text here"   This would be easy with lookbehind, but that's not in JS.  something I tried:  .replace...
I have the following regular expression in .Net  (?<=Visitors.{0,100}?"value">)[0-9,]+(?=</div>)   and the following text   <div class="text">Visitors</div> <div class="value">14,000,000</div&g...
If I look at the docs, it says * should always be greedy yet in this case it is not:  // returns 'password*****' instead of 'password: *****' 'password: "something"'.replace(/(?<=password[ :]*)[^\n,]+/i, '*****&...
I am working with regex with both PHP and JavaScript. So, I was looking for some good tutorial. From this regex tutorial I have found an example for lookbehind that matches a certain 3 digit number only if it is preceded by the the word "USD"...
I would like to construct a regular expression that matches any letter (including accented and Greek), number, hyphens and spaces with a total allowed characters length between 3 and 50.  This is what I made:  [- a-zA-Z0-9çæœáée?íóúžàèìò...
I am using ^(?= %)(.*?)(?=%) regex for find out all the elements between % . Test string is "Hey %firstName% %lastName%".  It works fine on chrome but fails on mozilla and ie....
I'm looking for your help because I'm having a weird issue with the Visual Studio 2015 editor. I have a javascript file that contains a regular expression that uses a lookbehind, something like this:   var regexStr = /(?<=[0-9a-zA-Z]+)(\/{...
I have written a regex pattern with positive look-behind in python which matches a comma-separated list of mobile numbers. The pattern is:  ^\+?[0-9]+((,?)(?(1)(\+?[0-9]+)))*$   It matches any mobile number regarding following con...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.