To find names containing exactly five characters, use 「^」and 「$」to match the beginning and end of the
name, and five instances of 「.」in between:
mysql> SELECT * FROM pet WHERE name REGEXP '^.....$';mysql
或者sql
SELECT * FROM pet WHERE name REGEXP '^.{5}$';co