in reply to Re: counter for each regex match.
in thread counter for each regex match.

Thanks for the explanation. Moving the print statement out of the for loop did the trick. Elementary mistake =/