Regular expression question
| From: | Leon Mergen | Date: | Fri, 09 Nov 2001 18:53:51 +0000 |
| Subject: | Regular expression question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-74041@lists.php.net to get a copy of this message | ||
Hello,
I have a little question regarding regular expressions... I want to check
for the pattern
$num::
But, $num may not be started with another number (assume the number will be
51 , 1 will also match (the pattern 1:: is available in 51::) ... Currently,
my regular expression is:
eregi("([^0-9]$num::)", $string);
But that doesn't seem to work... The other option, the start of a line or a
: also didn't work:
eregi("([^|:]$sess_id::)", $string);
Anyone can help me with this?
Thanks in advance,
Leon Mergen