\\d{3}-\\d{4}';
Query OK, 0 rows affected (0.00 sec)
mysql> select regexp_count(@s, @r, 'n') c, regexp_extract...匹配一个可选的左括号。注意,这里必须对 ( 进行转义,\d{3} 匹配前3位数字,
\)? 匹配一个可选的右括号,-?...匹配一个可选的连字符,\d{3}-\d{4} 匹配剩余的 7 位数字
(中间用一个连字符分隔)。...;
Query OK, 0 rows affected (0.00 sec)
mysql> select regexp_count(@s, @r, 'n') c, regexp_extract(@s,...$';
Query OK, 0 rows affected (0.00 sec)
mysql> select regexp_count(@s, @r, 'm') c, regexp_extract(@