开发者

Regex for mysql query to match html entities

I understand PCRE pretty well, but MySQL's regular expression flavor seems to get the best of me.

Can someone help me correct this expression? The PCRE equivalent would be &\w+;

I'm guessing something like:

select body from email where body rlike '&[[:alpha:]]+;%'开发者_JAVA百科

Bonus:

MySQL's docs on their regex flavor seem kinda sparse. Does anyone have a good resource specifically geared toward mysql regex they can point me to?


try this:

select body from email where body REGEXP '\&[a-z0-9A-Z]+\;'


Try this. http://www.brainbell.com/tutorials/MySQL/Using_MySQL_Regular_Expressions.htm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜