summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Hostbase/regex.py
blob: 41cc0f6f0463f3e83644af5a1187e22e4a88f116 (plain)
1
2
3
4
5
6
import re

date = re.compile('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
host = re.compile('^[a-z0-9-_]+(\.[a-z0-9-_]+)+$')
macaddr = re.compile('^[0-9abcdefABCDEF]{2}(:[0-9abcdefABCDEF]{2}){5}$|virtual')
ipaddr = re.compile('^[0-9]{1,3}(\.[0-9]{1,3}){3}$')