I am having problems with my regex. It's returning the first match when I want it to return the last match.
Regex Pattern:
(?si)&chg_id= *?(.*?)\"
String being searched:
Display charges for the period 2010-05-04 11:21:00 to 2010-06-10 23:59:59
<A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=1861161"><P>Display the period 2010-06-11 00:00:00 to 2010-07-10 23:59:59</A>
<A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=2033934"><P>Display the period 2010-07-11 00:00:00 to 2010-08-10 23:59:59</A>
<A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=2217641"><P>Display the period 2010-08-11 00:00:00 to 2010-09-10 23:59:59</A>
<A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=2411848"><P>Display the period 2010-09-11 00:00:00 to 2010-10-10 23:59:59</A>
<A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=2615705"><P>Display the period 2010-10-11 00:00:00 to 2010-11-10 23:59:59</A>
<A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=2830781"><P>Display the period 2010-11-11 00:00:00 to 2010-12-10 23:59:59</A>
My expression is returning 1861161 but I want it to return 2830781 instead.