Reply to Re: [PHP] Re: Can someone help me build a regular expression?

Your name:

Reply:


Posted by Matthew Weier O'Phinney on 05/03/05 19:23

* Rory Browne <rory.browne@gmail.com>:
> > 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),

The 'm' is an optional flag indicating that a 'match' regexp (versus a
substitution or transliteration) follows. It's typically only necessary
in perl if using delimiters other than / around the regexp.

(The person who posted that should have written it as PHP to avoid
confusion: preg_match('/^[0-9][A-Z][a-z]{2-3} \.[0-9]+$/', $string);)

--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:matthew@garden.org | http://vermontbotanical.org

[Back to original 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

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