NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL question

Jay Greenspan jay at trans-city.com
Thu Jun 27 13:42:53 EDT 2002


Here's the basics with some pretty lame regex:

mysql> create table size_test(afield varchar(255));
mysql> insert into size_test values(' blah blah <font size>');
mysql> insert into size_test values(' blah blah <font size> the size is');
mysql> select afield from size_test where afield regexp '>.*size.*';
+------------------------------------+
| afield                             |
+------------------------------------+
|  blah blah <font size> the size is |
+------------------------------------+
1 row in set (0.00 sec)


-j

On 6/27/02 12:20 PM, "Preston-Campbell" <brian at preston-campbell.com> wrote:

> it is possible to use regex in MySQL queries so you could eliminate anything
> between < and > for example.
> 
> MySQL by Paul Dubois covers this subject quite well.




More information about the talk mailing list