Regular Expression for exclude something that has specific word inside bracked (MySQL)

Posted by bn on Stack Overflow See other posts from Stack Overflow or by bn
Published on 2010-05-18T10:59:30Z Indexed on 2010/05/18 11:10 UTC
Read the original article Hit count: 189

Filed under:
|
|

This Regular expression if for MySQL query:

I want to exclude this row because it has 'something' in side the bracket "bla bla bla bla bla bla (bla bla bla something)"

However I want to include this row, because it does not have 'something' inside the bracket "bla bla bla (bla bla bla)"

I tried this query but it didnt work.

SELECT * FROM table WHERE field NOT REGEXP '((%something%))';

I think this is wrong, I just did trial and error, I like to use regular expression, but never understand it completely. is there any good tutorial/books/links for learning the detail of regular expression?

Thank You

© Stack Overflow or respective owner

Related posts about regex

Related posts about expression