Not that familiar with MySQL's flavor of RegEx (and the documentation seems
to be extremely bad ... or at least I can't seem to find any with casually
searching) but have you tried escaping the RegEx special characters? eg
REGEXP ('ok\/2.0 \(hah 3\.0; BAM oh 5\.1; \.hi CLR 1\.0\.4725\)');
-Peter
> -----Original Message-----
> From: Taylor York [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, September 21, 2002 00:17
> To: [EMAIL PROTECTED]
> Subject: [PHP] Reg Exp issue
>
>
> Hello, I am trying to find a string in another string with
> mysql. Normally,
> this would work.
>
> select 'foo' REGEXP ('foo');
>
> And that would simply return 1, since it found it. But, my
> strings are more
> complicated than that.
> One good random example is something like this..Ya i know,
> its wierd but go
> with me on this.
>
> ok/2.0 (hah 3.0; BAM oh 5.1; .hi CLR 1.0.4725)
>
> so you would do a select like..
>
> select 'ok/2.0 (hah 3.0; BAM oh 5.1; .hi CLR 1.0.4725)'
> REGEXP ('ok/2.0 (hah
> 3.0; BAM oh 5.1; .hi CLR 1.0.4725)');
>
> That of course doesnt work. All of the () 's, and /'s, and
> .'s, mess it all
> up. And suggestion on what to do? any function to convert all of the
> special regexp characters ()[];.^*$ etc to work correctly?
>
> Thank You,
> Taylor York
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php