Difficult-Rocket/tests/test_re.py
2021-02-03 22:04:34 +08:00

6 lines
110 B
Python

import re
ipv4 = re.compile('[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}')
print(re.match(ipv4, '1.2.3.2'))