select * from contacts where phone_number regexp'^[1-9][0-9]{9}$|^[1-9][0-9]{2}-[0-9]{3}-[0-9]{4}$' order by id asc 除了一楼的解题思路,也可以用“|”(“|”表示或者)即“|”前面的“^[1-9][0-9]{9}$”表示不含“-”的10位数字;“|”后面的“^[1-9][0-9]{2}-[0-9]{3}-[0-9]{4}$”表示带有“-”的10位数字。