On 03/16/2004 6:57 AM, Rob Ellis <[EMAIL PROTECTED]> wrote:

> On Tue, Mar 16, 2004 at 02:39:27PM +0200, Brent Clark wrote:
>> Hi there
>> 
>> im in desperate need of help for a reg expression to ONLY allow 8 NUMBERS to
>> start with 100 and may not have any other kind of
>> letters or  characters. Only numbers
>> 
>> for example 
>> 10064893
>> 
> 
> if (preg_match('/^100\d{5}/', $test))
> print "ok\n";

Unless you want to allow something like '10064893A' to match, use:

preg_match('/^100\d{5}$/', $test)

Pablo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to