I'am trying to delete words which have 2 capital letters consecutively with MySQL. Like: "ABC", "AA", "NBC". No others.
The following query doesn't work (it finds all words, which have 2 letters)
WHERE names REGEXP '[A-Z][A-Z]'
Do you know how to do that?
WHERE names REGEXP BINARY '[A-Z]{2}'
REGEXP is not case sensitive, except when used with binary strings.
http://dev.mysql.com/doc/refman/5.5/en/regexp.html
This pattern matches two or more leading uppercase characters:
WHERE names REGEXP BINARY '^[A-Z]{2,}';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With