Date: 11/30/01
- Next message: es said: "[PHP-DB] set primary key of a mysql-table automatically as value in other tables of the same db"
- Previous message: Dobromir Velev: "Re: [PHP-DB] MySQL socket error"
- Maybe in reply to: Arash Dejkam: "[PHP-DB] mysql and regular expressions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>>
To: php-db <email protected> <php-db <email protected>>
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 <email protected>
>For additional commands, e-mail: php-db-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: es said: "[PHP-DB] set primary key of a mysql-table automatically as value in other tables of the same db"
- Previous message: Dobromir Velev: "Re: [PHP-DB] MySQL socket error"
- Maybe in reply to: Arash Dejkam: "[PHP-DB] mysql and regular expressions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

