Hi,

I have a table in which one column stores some alphanumeric values
I am trying to get a count of records in my database that have a particular format (and those that don't)
The column has values in the following formats
AAxxxxxxxxxAAAAA
and
xxxxxxxxxxxxxxxx

where AA are alpha characters and xxxx are numeric characters
I tried the following to get the count of ones formated like AAxxxxxxxxxAAAAA
I also tried replacing the REGEXP with like
but still I am getting 0 all the time

Code MySQL:
SELECT count( * ) 
FROM mytable
WHERE myfield
REGEXP '[A-Z]{2}-[0-9]{9}-[A-Z]{5}';

Any help would be appretiated
Thanks