iteration problem

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
deadcow
Forum Newbie
Posts: 3
Joined: Thu Mar 18, 2010 2:41 am

iteration problem

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: iteration problem

Post by Christopher »

Iteration? Are you using preg_match() or something?
(#10850)
deadcow
Forum Newbie
Posts: 3
Joined: Thu Mar 18, 2010 2:41 am

Re: iteration problem

Post by deadcow »

Yes I use preg_match.
deadcow
Forum Newbie
Posts: 3
Joined: Thu Mar 18, 2010 2:41 am

Re: iteration problem

Post by deadcow »

Should be test.+?end\((\d+)\). Thank you.
Post Reply