New submission from Борис Верховский <[email protected]>:
re.compile('([-_.a-zA-Z0-9]+)') == re.compile(r'([-\w.]+)')
should return True because those are the same regex (\w is a-z, A-Z, 0-9 and
the underscore).
If you want to check if two regexes are identical you would compare the
original strings, before re.compile.
----------
components: Regular Expressions
messages: 355791
nosy: boris, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Checking if two regexes are equal should test if they are functionally
equivalent
type: enhancement
versions: Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com