Skip to main content
3 votes
3 answers
106 views

Find regex match separated by two semicolons

This is the type of text I'm working with: * went to the building; opened the door; closed the door; picked up some money ($20) * walked next door; knocked on a window; purchased an apple pie ($6.95) *...
recursivedelete's user avatar
-6 votes
2 answers
170 views

Only match phrases when not part of other phrases with regex

I want to do the following with Javascript regex: Match words or phrases inside larger texts. However, if a word/phrase is part of a set of excluded phrases, skip the match. For example: I want to ...
spaceemotion's user avatar
  • 1,548
0 votes
1 answer
47 views

Discard a match if one pattern isn't followed by another

I'm trying to find numbers in Notepad++ that are followed by </tspan>, which is followed by many characters including newlines, and in the end it should be fill:# followed by 00d5ff. So far I ...
Necronomicron's user avatar
2 votes
1 answer
66 views

Regex expression to find end of multiline YAML codeblock

I'm working on adding folding markers to my FastColoredTextBox for YAML. For this I need to detect the start & end of a block of comments (with 2 regex) I want to be able to collapse. For example #...
J0r1s's user avatar
  • 41
-1 votes
1 answer
52 views

Regex matching with multiple negative look behind conditions [duplicate]

I would like to create a regex pattern that does not match multiple negative look behind patterns. But if I try to compile a pattern like import re split_pattern = re.compile("(?<!AA|BAB|CAC|...
Uwe.Schneider's user avatar
3 votes
1 answer
66 views

Removing a named reference and all its calls with AutoWikiBrowser and .NET regexes

I wonder if it would be possible to create a .NET regular expression that would delete a reference named Wikipedia containing a certain text, as well as all its calls in the page that don't contain ...
oli_vi_er's user avatar
  • 378
1 vote
2 answers
84 views

Regex for a date not preceded by = or |

I'm looking for a regular expression to use with AutoWikiBrowser (flavour .NET) that allows me to encapsulate simple dates in Wikipedia.fr {{date}} template, but not if they're preceded by an = (which ...
oli_vi_er's user avatar
  • 378
3 votes
3 answers
121 views

regex to match all unescaped '$' in a regex string

I want to build a regex that will match all unescaped $ in strings that represents a regex. In this case, a character is unescaped if it contains an equal number of backslashes behind it (each pair of ...
Benny Brudner's user avatar
1 vote
1 answer
65 views

Confusing behavior of a capturing group in a positive lookbehind in a Java regex with Pattern.matcher

The following issue is observed only on Java and not on other regex flavors (e.g PCRE). I have the following regex: (?:(?<=([A-Za-z\d]))|\b)(MyString). There's a capturing group on [A-Za-z\d] in ...
wouldnotliketo's user avatar
0 votes
1 answer
54 views

Matching text inside single but not multple delimiter characters in a regular expression

I’m to find a regular expression to match strings inside single but not multiple particular characters. For example: this is =one= and =two= but not ==three== or ==four== etc Here I’m using = as a ...
Manngo's user avatar
  • 16.9k
1 vote
2 answers
172 views

Tell if a Python regex string has a lookaround

I'd like to be able to reliably tell if a Python regex string contains a lookahead or lookbehind. It seems to me the code: bool(re.search(r'\(\?=[^)]*\)|\(\?!', regex_string)) should match when a ...
Richard Shadrach's user avatar
0 votes
3 answers
91 views

How can I exclude a single character from a list only when followed by certain other characters?

I want to parse certain character combinations which represent musical pitches from the begining of a string. For that I am using regular expressions (NSRegularExpression in Swift, if that matters). ...
MassMover's user avatar
  • 577
1 vote
3 answers
119 views

Regex to match certain numbers from and to a range

I have tried chatgpt for a correct answer but it doesn't give me a working solution. I want to match (only) the digits before the "m2" and only if it is preceded by the wording "...
Fokker's user avatar
  • 21
1 vote
2 answers
74 views

Escaping negative lookbehind in regex inside XSLT w/ Saxon

I am trying to do string replacement in an XSLT 2.0 stylesheet. I am doing this via Saxon, in oxYgen or in my own Java code. The string replacement I am trying to do is: remove all open parentheses ...
Bernd Moos's user avatar
2 votes
3 answers
70 views

Regex to find string not followed by separator and 1 or 2 digits

I need to make a regex (.net flavour) that matches only "sometext" in the following strings (the second line has a space at the end): sometext sometext sometext dsf 2131 sometext-1234 but ...
Daniel's user avatar
  • 1,507

15 30 50 per page
1
2 3 4 5
223