Get the line number for each regex match found in a string.