What is $num going to be? A number? So how do you determine where that
number ends and where there shouldn't be another number in front of it...are
there any restrictions on the size of $num?

say $num is 51
then you're saying that you want to match
51::
but not 151::
however, what if $num is 151? see what i mean?
----- Original Message -----
From: "Leon Mergen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 09, 2001 1:53 PM
Subject: [PHP] Regular expression question


> 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
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to