Re: Re: preg_match question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/2/6 Shawn McKenzie <nospam@xxxxxxxxxxxxx>

> bruce wrote:
> > hmmm...
> >
> > tried your preg__match/regex...
> >
> > i get:
> > 0 - 1145 total
> > 1 - 1145
> > 2 - l
> >
> > i would have thought that the 2nd array item should have had "total"...
> >
>
> Probably want this: '#(\d+)(.+)#'

That's it sorry. Take a look at preg_match_all(), you can put the total in
you regexp like /^([0-9]+) total/

>
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Alpar Torok

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux