Phone Number Validator Test - Python
Hi. I'm trying to solve the quiz but i'm really struggling because the theoric part of Regular Expression in the Python Core course is not very clear. This is how far i went: https://code.sololearn.com/ca11A15A122A Those are the errors i got: Traceback (most recent call last): File "/usercode/file0.py", line 7, in <module> match = re.search(pattern, number) File "/usr/local/lib/python3.8/re.py", line 201, in search return _compile(pattern, flags).search(string) File "/usr/local/lib/python3.8/re.py", line 304, in _compile p = sre_compile.compile(pattern, flags) File "/usr/local/lib/python3.8/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/local/lib/python3.8/sre_parse.py", line 948, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/local/lib/python3.8/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/local/lib/python3.8/sre_parse.py", line 525, in _parse code = _escape(source, this, state) File "/usr/local/lib/python3.8/sre_parse.py", line 423, in _escape raise source.error("invalid group reference %d" % group, len(escape) - 1) re.error: invalid group reference 8 at position 11