Declare @match before the loop (so that it is not overwritten each time), append any matches to @match, and move the print statement outside the while loop.
And you didn't even know bears could type.
Comment on Re: Printing the count for regex matches