Re: Re: Can someone help me build a regular expression?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> You mite try this. I know that this work with perl.
> 
> =~ m/^[0-9][A-Z][a-z]{2-3} \.[0-9]+$/

I'm not sure what the initial m does(I'm not a perl person), but the
rest of the regex matches as follows.

A string whose first character is a digit between 0 and 9. This is
followed by an Upper case letter, and then two or three lower case
letters. All that is followed by a period(or dot), after which may be
a single-digit number, but nothing else.

It matches the following:

1Abc.2
1Abcd.2
1Abc.
1Abcd.


> 
> I'm still very new to this. But I'm trying to help.
> Thomas
> freeswimfreak@xxxxxxxxx
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux