import re file3 = 'keyvalue_reference_1.json' pattern = re.compile("keyvalue_reference_[0-9]+.json") re = pattern.match(file3) if re: print('matched') else: print('non matched')
Thank you.
import re file3 = 'keyvalue_reference_1.json' pattern = re.compile("keyvalue_reference_[0-9]+.json") re = pattern.match(file3) if re: print('matched') else: print('non matched')
No comments:
Post a Comment