in reply to Re: regex greedinessin thread regex greediness
/(a)(?=(.*?)(?:b=(\w)))?/ [download]
/(a)(.*?)(?=b=(\w)|\z)/ [download]