June 14th, 2013, 03:57 AM
How did SELECT 'aXbc' REGEXP '^[a-dXYZ]$'; results in false
Hi with reference to
[mysql 5.5 documentation]/regexp.html, sorry I'm a new account so can't post link
I still do not understand why the result is false.
I mean REGEXP '^[a-dXYZ]$'
means front bank and end the pattern must be in a,b,c,d, X,Y Z set, am I right?
am I getting things wrong?
June 14th, 2013, 04:28 AM
the regex you've written down matches a string consisting of a single character of the list a, b, c, d, X, Y, Z..
If you want a string starting with a character of this list, followed by an arbitrary number of characters and ending with a character of this list, you need:
Comments on this post