Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-28 Thread Nathan Rixham
Shiplu wrote: Sorry The previous code was wrong, Its the correct version, $x = "a b;c d;e f;"; preg_match('/(?P\w) (?P\w)/',$x,$m); print_r($m); Now I am using backrefrence \1 in in ?P option like (?P<\1>\d+). and I got the error. thought I best update for courtesy sake; I spent a good chun

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
Sorry The previous code was wrong, Its the correct version, $x = "a b;c d;e f;"; preg_match('/(?P\w) (?P\w)/',$x,$m); print_r($m); Now I am using backrefrence \1 in in ?P option like (?P<\1>\d+). and I got the error. -- Blog: http://talk.cmyweb.net/ Follow me: http://twitter.com/shiplu Stop

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Nathan Rixham <[EMAIL PROTECTED]> wrote: > Shiplu wrote: > > > The string is "charge100". > > I want and array( "charge"=>100). > > I am using this regular expression, > > '/([^<]+)<\/td>(?P<\1>\d+)<\/td>/'. > > > > > > But its not working.. > > > > I get this error., > > PHP Warning:

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Nathan Rixham
Shiplu wrote: The string is "charge100". I want and array( "charge"=>100). I am using this regular expression, '/([^<]+)<\/td>(?P<\1>\d+)<\/td>/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in E:\src\php\WebEngin

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Al
Shiplu wrote: The string is "charge100". I want and array( "charge"=>100). I am using this regular expression, '/([^<]+)<\/td>(?P<\1>\d+)<\/td>/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in E:\src\php\WebEng

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Al <[EMAIL PROTECTED]> wrote: > What's the complete row? e.g., > > charge100 > > Or, are there other cells in the row? No TD cells. forget the real world problem. I made the exact replica of that. I need the sample work. -- Blog: http://talk.cmyweb.net/ Follow me: http://twitter.c

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Nathan Rixham <[EMAIL PROTECTED]> wrote: > Shiplu wrote: > > > The string is "charge100". > > I want and array( "charge"=>100). > > I am using this regular expression, > > '/([^<]+)<\/td>(?P<\1>\d+)<\/td>/'. > > > > > > But its not working.. > > > > I get this error., > > PHP Warning:

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Al
What's the complete row? e.g., charge100 Or, are there other cells in the row? Shiplu wrote: The string is "charge100". I want and array( "charge"=>100). I am using this regular expression, '/([^<]+)<\/td>(?P<\1>\d+)<\/td>/'. But its not working.. I get this error., PHP Warning: preg_matc

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Nathan Rixham
Shiplu wrote: The string is "charge100". I want and array( "charge"=>100). I am using this regular expression, '/([^<]+)<\/td>(?P<\1>\d+)<\/td>/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in E:\src\php\WebEngin