|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
regexp negate string help
From: Tang, Jasmine (Jasmine.Tang
netapp.com)
Date: Mon Sep 24 2007 - 16:22:07 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I need to match anything that start with "foo" then followed by a string
containing letter/number/underscore/dot but NOT end with the string
"linux". When I use the pattern 'foo[(a-z|0-9|_|.)]+(?!linux)' , I got
"ERROR 1139 (42000): Got error 'repetition-operator operand invalid'
from regexp". I got the look-ahead assertion syntax (?!string) from
Perl regexp, but mysql apparently doesn't like that.
Specially, the following should match:
foodafdlj_endwithx
food3242jljlsd.endwithn
but this should NOT match
foosdfjl.blah_linux
any suggestions?
thanks!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]