Re: regexp match string with word1 and not word2
- From: Steven Bethard <steven.bethard@xxxxxxxxx>
- Date: Mon, 30 Apr 2007 12:00:26 -0600
Flyzone wrote:
On 30 Apr, 17:11, Steven Bethard <steven.beth...@xxxxxxxxx> wrote:
You don't need a regexp:;
I need a regexp.....i'm parsing a file with a rule-file that contains
also regexp and strings too....
Well then it seems like you might want to rethink this rule-file approach since your problem is clearly not amenable to regular expressions.
That said, here's a regexp that might work::
((?!two:).)*one((?!two:).)*
That makes a negative lookahead assertion at each character in the string.
STeVe
.
- References:
- regexp match string with word1 and not word2
- From: Flyzone
- Re: regexp match string with word1 and not word2
- From: Steven Bethard
- Re: regexp match string with word1 and not word2
- From: Flyzone
- regexp match string with word1 and not word2
- Prev by Date: RE: Dict Copy & Compare
- Next by Date: Is it possible to merge xrange and slice?
- Previous by thread: Re: regexp match string with word1 and not word2
- Next by thread: Reading From an Excel ***
- Index(es):