测试结果
mysql> -- 匹配单词the,统计出现的次数
mysql> select regexp_extract(a,'\\bthe\\b','') a,regexp_count(a,'\\bthe...> -- 匹配小写单词the,统计出现的次数
mysql> select regexp_extract(a,'\\bthe\\b','c') a,regexp_count(a,'\\bthe\\b','...> -- 多行模式匹配的所有单词,统计单词个数
mysql> select regexp_extract(a,'\\w+','') a,regexp_count(a,'\\w+','m') c from...> -- 区分大小写、多行、dotall模式匹配999,统计出现的次数
mysql> select regexp_extract(a,'999','') a,regexp_count(a,'999','...> -- 返回单词the出现的位置
mysql> select regexp_extract_index(a,'\\bthe\\b',0,'') a from t_regexp;
+----------