[issue29959] re.match failed to match left square brackets as the first char

Serhiy Storchaka report at bugs.python.org
Sat Apr 1 03:44:16 EDT 2017


Serhiy Storchaka added the comment:

re.match() checks if the beginning of the string matches the regular expression pattern. Use re.search() if you want to find the match not at the beginning of the string.

https://docs.python.org/3/library/re.html#re.match
https://docs.python.org/3/library/re.html#re.search

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29959>
_______________________________________


More information about the Python-bugs-list mailing list