8 messages in net.php.lists.php-generalRe: [PHP] Re: Can someone help me bui...
FromSent OnAttachments
mwes...@sola.com.auMay 2, 2005 1:09 am 
Jason SweeneyMay 2, 2005 5:19 am 
Thomas BonhamMay 2, 2005 5:51 am 
mwes...@sola.com.auMay 2, 2005 4:12 pm 
Rory BrowneMay 2, 2005 4:30 pm 
Jochem MaasMay 2, 2005 5:06 pm 
Matthew Weier O'PhinneyMay 3, 2005 9:23 am 
Kim MadsenMay 4, 2005 6:03 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [PHP] Re: Can someone help me build a regular expression?Actions...
From:Rory Browne (rory@gmail.com)
Date:May 2, 2005 4:30:05 pm
List:net.php.lists.php-general

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 free@yahoo.com