0 points

python - Check if string matches pattern - Stack Overflow


dashboard

Wed Aug 12 2020 03:09:20 GMT+0000 (UTC)

Posted by @omzep #regex #python #match

import re
if re.match(r"hello[0-9]+", 'hello1'):
    print('Yes')
content_copy Copy

https://stackoverflow.com/questions/12595051/check-if-string-matches-pattern