Hi, * David T-G [05/31/02 15:23:14 CEST] wrote:
> Have you tried > [^b][^a][^c][^k][^1]* > to match "zero or more not-one"s? See answer. I've already asked a few people how to best solve problems like your and mine. No way. I was advised to write a script which creates which takes all possible values and a blacklist pattern and returns a whitelist. Regular expressions are really great -- but not if someone wanted to work with blacklists. * Dan Boger [05/31/02 16:28:34 CEST] wrote: > On Fri, May 31, 2002 at 08:39:20AM -0500, David T-G wrote: > > % just occured to me that this won't match "back2" either, since it starts > > % with a "b"... > > Yeah, that's another problem that occurred to me after posting. I had > > the same sort of problem with $alternates; I'd really like to be able to > > say something like > > set alternates = "[^(laura*|madi|^quin*)]@justpickone.*" Hey, didn't your wife read the mail for the cat? ;-) > what we need is like the perl lookbehind: > (?<!pattern) > A zero-width negative lookbehind assertion. For > example /(?<!bar)foo/ matches any occurrence of > "foo" that isn't following "bar". Works only > for fixed-width lookbehind. That's worth a try. > another by the way - having a trailing .* is a nop, just eats cpu cycles > (in a patterm match)... If I had as much [insert_favorite_good_here] as I have CPU cycles waiting to be wasted... Cheers, Rocco