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 <rep...@bugs.python.org> <http://bugs.python.org/issue29959> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com