SELECT object_nm FROM `objects` WHERE `object_nm` REGEXP '[^0-9]*Vasil[^0-9]*[^0-9]Levski[^0-9]*[^0-9]1[^0-9]*'
我想要的是搜索'Vasil levski 1',在单词之间只允许使用字母(任意长度)。
答案 0 :(得分:0)
这个怎么样:
^[[:alpha:] ]*Vasil[[:alpha:] ]*Levski[[:alpha:] ]*1[[:alpha:] ]*$
<强>解释强>
^ # Start of string
[[:alpha:] ]* # Any number of letters or spaces
Vasil # Vasil
[[:alpha:] ]* # Any number of letters or spaces
Levski # etc.
[[:alpha:] ]*
1
[[:alpha:] ]*
$ # until end of string