如何使用正则表达式匹配没有任何字母、数字或特殊字符的单词?

How to use regular expression to match word without any letter,digital or special character?

我想用正则表达式过滤掉纯中文名字:

SELECT `name` FROM `table`  WHERE `name` REGEXP '[u4e00-u9fa5]';

但是,根据this,这是不可能的,所以我想从相反的方向接近,找到没有任何字母,数字和特殊字符的内容(我知道它不死板) ,但是找不到"and"运算符,怎么办?

MariaDB 使用 PCRE 正则表达式库,从 10.0.5 版本开始:“Starting with MariaDB 10.0.5, MariaDB switched to the PCRE regular expression library for enhanced regular expressions.”.

要匹配包含中文字母的条目,请使用

REGEXP '[\x{4e00}-\x{9fa5}]'

甚至

REGEXP '\p{Han}'

反向匹配,没有汉字的词条,使用:

REGEXP '^[^\x{4e00}-\x{9fa5}]*$'

REGEXP '^\P{Han}*$'