Top "Regex-lookarounds" questions

Regular expression lookarounds are zero-width assertions that verify conditions about the context of a match at the current match position.

Regex get text before and after a hyphen

I have this string: "Common Waxbill - Estrilda astrild" How can I write 2 separate regexes for the words before and …

regex regex-lookarounds
Negative look-ahead in Go regular expressions

I'm trying to use negative look-aheads in Go. The following regular expression: BBB(((?!BBB).)*)EEE http://rubular.com/r/Zw1…

regex go regex-lookarounds
Python regex lookbehind and lookahead

I need to match the string "foo" from a string with this format: string = "/foo/boo/poo" I tied this …

regex regex-lookarounds lookbehind
Regex to allow only number between 1 to 12

Regex to allow only number between 1 to 12 I am trying (12)|[1-9]\d? but its not working, please help as i …

regex regex-lookarounds
Java RegEx negative lookbehind

I have the following Java code: Pattern pat = Pattern.compile("(?<!function )\\w+"); Matcher mat = pat.matcher("function example"); System.…

java regex regex-lookarounds
Can sed regex simulate lookbehind and lookahead?

I'm trying to write a sed script that will capture all "naked" URL's in a text file and replace them …

regex sed awk regex-negation regex-lookarounds
Using regex lookahead, egrep

If your file contains apples are good apple cider is also good Why would egrep '(?=apples)app' file fail …

regex grep regex-lookarounds
Regex for existence of some words whose order doesn't matter

I would like to write a regex for searching for the existence of some words, but their order of appearance …

python regex string string-matching regex-lookarounds
Java regular expression with lookahead

is there a way to print out lookahead portion of a regex pattern in java? String test = "hello world this …

java regex pattern-matching regex-lookarounds
Regular expression using negative lookbehind not working in Notepad++

I have a source file with literally hundreds of occurrences of strings flecha.jpg and flecha1.jpg, but I need …

regex notepad++ regex-lookarounds negative-lookbehind