thomas Armstrong wrote:
If you need something more complicated, such as only ignoring "(", then you
need to get more complicated. You might even need a regular expression.
I'm to browse:
http://dev.mysql.com/doc/refman/5.0/en/regexp.html
http://www.wellho.net/regex/mysql.html

You know, you don't have to do fancy regexp matching or even LIKE. There's really no advantage to using those over what looks like it'll be simpler in this case: INSTR().

SELECT INSTR('John (Johnie)', 'Johnie') AS John, INSTR('Peter', 'Johnie') AS Peter;
+------+-------+
| John | Peter |
+------+-------+
|    7 |     0 |
+------+-------+

Just say "WHERE INSTR(haystack, needle) > 0" in your WHERE clause, and you're done.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to