Some values in the ID number field in the table are invalid. How can I check the valid information for the ID number? Thanks
伊谢尔伦2017-05-18 10:50:22
Regular expression:
ID card regex: d{6}(18|19|20)d{2}(0[1-9]|1[120])(0[1-9]|[12]d|3[01])d{3}(d|X)
Mysql regex:
select *
from table
where identity regexp '[[:digit:]]{6}(18|19|20)[[:digit:]]{2}(0[1-9]|1[120])(0[1-9]|[12][[:digit:]]|3[01])[[:digit:]]{3}([[:digit:]]|X)'