Regex string doesn't match

前端 未结 3 1558
独厮守ぢ
独厮守ぢ 2020-12-21 04:31

I\'m having trouble matching a digit in a string with Python. While it should be clearly matched, It doesn\'t even match [0-9] [\\d] or just

3条回答
  •  我在风中等你
    2020-12-21 04:58

    Read the documentation: http://docs.python.org/2/library/re.html#re.match

    If zero or more characters at the beginning of string

    You want to use re.search (or re.findall)

提交回复
热议问题