Re: mysql and regular expressions
| From: | Dobromir Velev | Date: | Fri, 30 Nov 2001 08:23:19 +0000 |
| Subject: | Re: mysql and regular expressions | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14712@lists.php.net to get a copy of this message | ||
Hi,
REGEXP is just a pattern matching operator it will always return true or false.
I guess you'll have to use ereg_replace() when using the results of your query.
You also can try to use the MID function if the desired result has an absolute position within the
string you're matching.
Hope this helps
Dobromir Velev
Web Developer
http://www.websitepulse.com/
-----Original Message-----
From: Arash Dejkam <arash@dejkam.f2s.com>
To: php-db@lists.php.net <php-db@lists.php.net>
Date: Friday, November 30, 2001 05:11
Subject: [PHP-DB] mysql and regular expressions
>Hi,
>
>SELECT "aaa45aaa" REGEXP "aaa(\d\d)aaa" -> returns 1;
>
>is there any function in mysql to return "45" instead on 1 ?
>
>Arash
>http://www.dejkam.com
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
>For additional commands, e-mail: php-db-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>