喜悦国际村 » 数据库技术 » 请教一个mysql正则表达式的问题

页: [1]
sailorcc2004-8-5 09:53 AM
请教一个mysql正则表达式的问题

近日学习mysql附录文档,关于正则表达式有这样一段描述:
[[.characters.]]
The sequence of characters of that collating element. The sequence is a single element of the bracket expression's list. A bracket expression containing a multi-character collating element can thus match more than one character, e.g., if the collating sequence includes a ch collating element, then the regular expression [[.ch.]]*c matches the first five characters of chchcc.
主要意思就是该表达式包含有字符顺序的元素,在括号内的字符顺序是唯一的,使用通配符能匹配更多的字符.如[[.ch.]]*c匹配chchcc的前五个字符。
按照以上理论,我在mysql中进行了实验:
select "chchccc" regexp "[[.ch.]*c]";
结果系统提示:Got error 'invalid colloating element' from regexp
请问各位大虾问题出在哪里?
另外,请问[=charcters_class=] 和 [:charcters_class:] 到底有什么用处,

sailorcc2004-8-7 04:39 AM
[请求]没有人知道吗?

请大家帮帮忙啦!


查看完整版本: 请教一个mysql正则表达式的问题


Powered by Discuz! Archiver 6.1.0  © 2001-2006 Comsenz Inc.
Processed in 0.006171 second(s), 2 queries