Python’s fnmatch
library makes it easy to convert human-readable glob pattern to re.match()
-compatible regexps:
% python3
>>> import fnmatch
>>> fnmatch.translate('dupa.[ch]pp.*')
'dupa\.[ch]pp\..*\Z(?ms)'
>>>
The work is always in progress.
Python’s fnmatch
library makes it easy to convert human-readable glob pattern to re.match()
-compatible regexps:
% python3
>>> import fnmatch
>>> fnmatch.translate('dupa.[ch]pp.*')
'dupa\.[ch]pp\..*\Z(?ms)'
>>>