I seem to be getting additional variables that I do not want stored into this array. What I expected to return after running the following code is this
[('999-999-9999'), ('999 999 9999'), ('999.999.9999')]
However what I end up with is the following
[('999-999-9999', '-', '-'), ('999 999 9999', ' ', ' '), ('999.999.9999', '.', '.')]
The following is what I have
teststr = '''
Phone: 999-999-9999,
999 999 9999,
999.999.9999
'''
phoneRegex = re.compile(r'(\d{3}(-|\s|\.)\d{3}(-|\s|\.)\d{4})')
regexMatches = phoneRegex.findall(teststr)
print(regexMatches)