regex-negation Questions
3
Solved
I would like some help with regex.
I'm trying to create an expression that will include certain strings and exclude certain strings.
For example:
I would like to include any URL containing mobil...
Te asked 15/3, 2011 at 15:21
2
Solved
I need a regex to match if anywhere in a sentence there is NOT either < or >.
If either < or > are in the string then it must return false.
I had a partial success with this but only if...
Epiphora asked 5/11, 2010 at 12:50
6
Solved
The following are pseudo examples, not real regex, but still an example of what I mean:
.* (anything)
-.* (NOT anything)
[A-Z] (Any letter A to Z, caps only)
-[A-Z] (NOT any letter A to Z,...
Hidden asked 20/10, 2010 at 11:52
1
Is it possible to write a regexp rule in "one line" that says: neither A nor B.
For example:
String must contain NEITHER "foo" NOR "bar".
Why one line? Because the filtering tool I am using acc...
Abecedarium asked 3/6, 2010 at 10:14
3
I've got a regex issue, I'm trying to ignore just the number '41', I want 4, 1, 14 etc to all match.
I've got this [^\b41\b] which is effectively what I want but this also ignores all single itera...
Victoir asked 25/3, 2010 at 14:28
6
Solved
Easy question this time.
I'm trying to test whether or not a string does not contain a character using regular expressions. I thought the expression was of the form "[^x]" where x is the character...
Boycott asked 13/10, 2008 at 19:43
1
Solved
I've searched for questions like this, but all the cases I found were solved in a problem-specific manner, like using !g in vi to negate the regex matches, or matching other things, without a...
Pung asked 28/12, 2009 at 10:13
2
There are quite a few results for add trailing slash .htaccess on Google, but all examples I found require the use of your domain name, as in this example:
RewriteEngine On
RewriteBase /
RewriteCo...
Haggerty asked 3/11, 2009 at 15:36
5
Can regular expression be utilized to match any string except a specific string constant (i.e. "ABC")?
Is it possible to exclude just one specific string constant?
Agathaagathe asked 8/9, 2009 at 17:18
3
Solved
I would like to negate a set of words using java regex.
Say, I want to negate cvs, svn, nvs, mvc. I wrote a regex which is ^[(svn|cvs|nvs|mvc)].
Some how that seems not to be working.
Haygood asked 26/8, 2009 at 9:48
5
Solved
Using Ruby, how can I use a single regex to match all occurrences of 'y' in "xy y ay xy +y" that are NOT preceded by x (y, ay, +y)?
/[^x]y/ matches the preceding character too, so I need an alterna...
Vallombrosa asked 31/7, 2009 at 16:23
4
Solved
How would I go about using a negative lookbehind(or any other method) regular expression to ignore strings that contains a specific substring?
I've read two previous stackoverflow questions:
java-...
Angloirish asked 9/2, 2009 at 22:55
35
Solved
I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a re...
Nonresistant asked 2/1, 2009 at 7:30
4
Solved
I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring.
Example:
// Updated to be correct, thanks @Apocalisp
^foo.*(?<!bar)$...
Danieu asked 4/9, 2008 at 1:22
© 2022 - 2024 — McMap. All rights reserved.