Python regex string matching?

后端 未结 2 1382
再見小時候
再見小時候 2020-11-28 13:29

I\'m having a hell of a time trying to transfer my experience with javascript regex to Python.

I\'m just trying to get this to work:

print(re.match(         


        
2条回答
  •  悲&欢浪女
    2020-11-28 13:53

    the docs is clear i think.

    re.match(pattern, string[, flags])¶

    If zero or more characters **at the beginning of string** match the
    

    regular expression pattern, return a corresponding MatchObject instance. Return None if the string does not match the pattern; note that this is different from a zero-length match.

提交回复
热议问题