Re: Regular Expression Backreference in subpattern.

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

 



On 9/27/08, Richard Lynch <rlynch@xxxxxxxxx> wrote:
> Not sure what you think the (?P is doing, but it looks very suspicious to me...
>
>  I'm no PCRE expert though...
>
>  Try this:
>
>  '|<td>\\s*charge\\s*</td>\\s*<td>\\s*([0-9]*)\\s*</td>|'
>
>  \\s allows for whitespace
>
>  If you only want ones that HAVE to have numbers, and no blanks, change * after the 0-9] bit into +
>

It doesnt need \\s or \s. Because I have given the string. \s* is okay though.
Well, ?P is 100% okay with PCRE. it gives name subpattern matches
(details: http://www.php.net/manual/en/regexp.reference.php);


-- 
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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