[ciapug] regular expression help

Scott Phillips scott.phillips at DRAKE.EDU
Fri Aug 19 14:30:56 CDT 2005


Got it.  Thanks.





At 01:06 PM 8/19/2005 -0500, you wrote:
>Argh.  There is something seriously wrong with my brain today.
>
>I want to pull out the one or two consecutive digits in a string like 
>"Apr. 1" or "Dec 22" using preg_match or something similar.  Can someone 
>enlighten me?  Something like...
>
>$pattern = "([0-9])|[0-9][0-9]";
>$match = preg_match($pattern, $string);
>
>
>
>
>Scott Phillips
>Web Developer
>Cowles Library, Drake University
>(515) 271-2975
>_______________________________________________
>ciapug mailing list
>ciapug at cialug.org
>http://cialug.org/mailman/listinfo/ciapug



More information about the ciapug mailing list