Difficult-Rocket/tests/_test_re.py
2021-08-24 22:31:52 +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'))