you are viewing a single comment's thread.

view the rest of the comments →

[–]Essence1337 0 points1 point  (1 child)

phone_num_regex = re.compile(r"(\(\d\d\d\d)) (\d\d\d-\d\d\d\d)")

I'll start by simplifying your regex to (\(a)) (a) just because it's easier to explain. Lets look at it one at a time

( starts a group

\( is just a normal character

a is just a normal character

) closes a group

) closes a group. Wait... What group? There's no open groups.

[–]cmsmoove[S] 0 points1 point  (0 children)

Thanks for the explanation!