I see that regex has already been specified as a response, but I'm not even going to try a regex code as I'm still having difficulties understanding/writing them.

However, I'm a bit surprised that something like
Code:
set %html $gettok($gettok(sometext:.:[blah]:.:[blah]:.:[urlhere]:.:,4,91),1,93)
doesn't work for you, as a quick test does show it working on mIRC 6.34