//echo -a $regsub(string1blahblahblahblah,/(blah)/gi,,%a) $remove(string1blahblahblahblah,%a)

that will give you an echo of: 4 blahblahblahblah

for the the amount of matches to "blah" in string, and the regsub substitutes matches in string with ,whatever, and sets result to %a in this case, ,whatever, in this case is ,, = nothing, deletes it, so the all we have left after all blah matches are subed out, is string1, so then we can remove that from the whole string that we started with, and voila, your blahs are all there :P