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
Navigation:
[Reply to this message]
|