Page 1 of 1

iteration problem

Posted: Thu Mar 18, 2010 2:44 am
by deadcow
Could someone help me? I have string testxxxxxend(15)end(16) and I do test.+end\((\d+)\). Result is (16). But I need first iteration - (15). Couldn't find it in documentation. Thank you.

Re: iteration problem

Posted: Thu Mar 18, 2010 6:10 pm
by Christopher
Iteration? Are you using preg_match() or something?

Re: iteration problem

Posted: Thu Mar 18, 2010 6:16 pm
by deadcow
Yes I use preg_match.

Re: iteration problem

Posted: Thu Mar 18, 2010 11:53 pm
by deadcow
Should be test.+?end\((\d+)\). Thank you.