I've upgraded from 5.0.2 to 5.0.3 Beta, and now there is a glitch in
one of my regular expression queries.

The expression works like this: a query for 'search' returns true for
a matching 'search' field, but, querying 's$$#e%ar^c)(h' must also
return true for a 'search' field.  In other words, I need to pad every
letter of the search string and tell it to allow any number of
non-alphanumeric characters.

Here is the expression I'm using below, for the term SEARCH:

'[^a-zA-Z0-9]*S[^a-zA-Z0-9]*E[^a-zA-Z0-9]*A[^a-zA-Z0-9]*R[^a-zA-Z0-9]*C[^a-zA-Z0-9]*H[^a-zA-Z0-9]*'

As I said, it worked fine until I upgraded.  Is it to do with the
double parsing MySQL does with REGEXP's?

In some instances, I get emtpy result set where I used to get a match,
and in other instances, I get a 'repetition-operator operand invalid'.
 Is there a simple way I can prevent errors from a search string that
contains ^*$ or other sensitive expression characters?  addslashes()
in php maybe?

Any help is appreciated.

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

Reply via email to