Top "Regex-negation" questions

Regex-negation is an operation performed on a character class that complements its pattern.

Help with regex include and exclude

I would like some help with regex. I'm trying to create an expression that will include certain strings and exclude …

regex regex-negation
Regex for Passport Number

I am trying to implement regex validation for passport number. My requirement is Length should be minimum 3 characters to a …

c# regex regex-negation
R-regex: match strings not beginning with a pattern

I'd like to use regex to see if a string does not begin with a certain pattern. While I can …

regex r regex-negation
Regex: Matching by exclusion, without look-ahead - is it possible?

In some regex flavors, [negative] zero-width assertions (look-ahead/look-behind) are not supported. This makes it extremely difficult (impossible?) to state …

regex regex-negation
How do I turn any regex into an complement of itself without complex hand editing?

The following are pseudo examples, not real regex, but still an example of what I mean: .* (anything) -.* (NOT anything) […

regex regex-negation
JSLint "insecure ^" in regular expression

JSLint reports Insecure '^' for the following line. Why is that? Or is it just going to complain any …

javascript regex jslint regex-negation
Extending regular expression syntax to say 'does not contain text XYZ'

I have an app where users can specify regular expressions in a number of places. These are used while running …

c# .net regex regex-negation
What's a regex that matches all numbers except 1, 2 and 25?

There's an input of Strings that are composed of only digits, i.e. integer numbers. How to write a regex …

java regex regex-negation bean-io
Using regex to match string between two strings while excluding strings

Following on from a previous question in which I asked: How can I use a regular expression to match text …

regex regex-negation
C# - Regex Match whole words

I need to match all the whole words containing a given a string. string s = "ABC.MYTESTING XYZ.YOUTESTED ANY.…

c# regex regex-negation