matching parentheses in python regular expression

前端 未结 3 538
礼貌的吻别
礼貌的吻别 2020-12-21 08:05

I have something like

store(s)

ending line like 1 store(s) .. I want to match , it using python regular expression.

I

3条回答
  •  不知归路
    2020-12-21 08:41

    Python offers two different primitive operations based on regular expressions: match checks for a match only at the beginning of the string, while search checks for a match anywhere in the string (this is what Perl does by default)

    Straight from the docs, but it does come up alot.

提交回复
热议问题