How to correct unbalanced parenthesis error in regular expression?

前端 未结 2 1031
渐次进展
渐次进展 2021-01-22 20:30

I am learning regular expression through Al Sweigart\'s automate the boring stuff course on udemy, lesson 29. I get an error saying \"unbalanced parenthesis at position 414 (lin

2条回答
  •  没有蜡笔的小新
    2021-01-22 20:50

    You need to fix this line (\d{2,5}))? # extension number part (optional). Clearly it needs to either add/remove a parenthesis.

    Changing that line to (\d{2,5})? will fix the unbalanced parenthesis error.

提交回复
热议问题