pcre functions help
| From: | php | Date: | Sat, 06 Oct 2001 07:29:55 +0000 |
| Subject: | pcre functions help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70207@lists.php.net to get a copy of this message | ||
Hello all,
I am playing with the prce functions...
Just for examples sake I want to parse a page (string)
and the date is in brackets.
ie $page = "adsfasdfadsfadsf (10/10/01 4:00:00PM) adsfadsf";
now if i use:
if (preg_match('/\(.+\)/i',$page,$matches)) {
$thedate = $matches[0];
}
$thedate will return (10/10/01 4:00:00PM)
when all I really want is whats BETWEEN the brackets, ie 10/10/01 4:00:00PM
is there a "better" way to match, so that my "matching" criteria is
excluded?
thank you,
Sean