You are here: Re: [PHP] Re: Can someone help me build a regular expression? « PHP « IT news, forums, messages
Re: [PHP] Re: Can someone help me build a regular expression?

Posted by Rory Browne on 05/03/05 02:30

> 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@yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация