RE: [PHP] why isn't this regex working?
| From: | Jack Dempsey | Date: | Tue, 09 Oct 2001 21:52:10 +0000 |
| Subject: | RE: [PHP] why isn't this regex working? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70539@lists.php.net to get a copy of this message | ||
read http://php.net/ereg
the first array element is the complete match, the second element is your
first captured match...
-jack
-----Original Message-----
From: Boget, Chris [mailto:Chris.Boget@wild.net]
Sent: Tuesday, October 09, 2001 5:06 PM
To: 'php-general@lists.php.net'
Subject: [PHP] why isn't this regex working?
Given this line:
$headerDetails[subject] = "Here is my subject - [TradeID 1002660213]";
Why isn't this regex working?
eregi( "\[TradeID ([0-9]+)\]$", trim( $headerDetails[subject] ),
$tradeIDInfo );
echo "TradeID: " . $tradeIDInfo[0] . "<br>\n";
Chris