in reply to Regex match last

How many times will the substring appear? Not many? Great. Put it in a while-loop with the 'g' modifier and be done.