Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

[PHP3] Regex help From: Alan Baer (abbaer <email protected>)
Date: 01/13/99

I'm doing some regular expressions and am having trouble with the PHP syntax.
I'm used to perl style regex.

Specifically, how do you do non-greedy matching? I'm trying to extract some
<SELECT>...</SELECT> statements from a file. Here's what gets me, greedily, lots
of select statements:

ereg("(\<SELECT.*\</SELECT>)",$contents,$regs);

More generally, is there a reference for the style of regex that PHP uses? The
docs mention POSIX complient, but a pointer to what that means would be nice...

Alan

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev <email protected>