mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 15:35:50 +00:00
afc9db8bb7
The regexp was wrong, for example it matched "2.20x" but failed to match "3.1". Some test cases: >>> def f(title): ... version_number = re.search(_version_number_re, title) ... if version_number: ... return not re.search(_incomplete_version_number_re, ... version_number.group(0)) ... else: ... return False ... >>> [(s, f(s.encode('ascii'))) for s in ['foo', 'foo 3', 'foo 3.', 'foo 3.1', 'foo 3.14', 'foo 3.2.1', 'foo 3.2.1alpha', 'foo 3.1.a', 'foo 3.a', 'foo 3.x.1']] [('foo', False), ('foo 3', False), ('foo 3.', False), ('foo 3.1', True), ('foo 3.14', True), ('foo 3.2.1', True), ('foo 3.2.1alpha', True), ('foo 3.1.a', False), ('foo 3.a', False), ('foo 3.x.1', False)]