ok thanks,a simple answer but I'd like to understand the implications of using or not using the $&. From my untrained eye it seems that answer you kindly posted will be scanning the string twice. Once for the general pattern search and then again for the specific pattern, whereas using $& would not involve the second string scan ?
I thought, without trying it, that the hit from the second match would be compensated for by not using $&, but benchmark tests I tried indicate that that is not the case. I didn't see any additional hit as a result of using $& at all!
I guess the moral is: try the simple stuff, but validate assumptions.