2

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:]]+;%'

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?

3
  • A bonus question... funny :) Is there also a bonus award? ;) Commented Mar 29, 2010 at 18:47
  • @Felix: yes, the OP will get friends to join SO and upvote too. Commented Mar 29, 2010 at 18:51
  • 2
    Bonus cheat: regular-expressions.info/mysql.html Commented Mar 29, 2010 at 19:06

2 Answers 2

3

try this:

select body from email where body REGEXP '\&[a-z0-9A-Z]+\;'
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.