-
Notifications
You must be signed in to change notification settings - Fork 0
MACAddress
Giuseppe Cannella edited this page Feb 19, 2020
·
2 revisions
Type name | example |
---|---|
MACAddress | fE:dC:bA:98:76:54 |
import com.github.gekomad.regexcollection.MACAddress
import com.github.gekomad.regexcollection.Validate.validate
assert(validate[MACAddress]("""ab""") == None)
assert(validate[MACAddress]("""01:23:45:67:89:a""") == None)
assert(validate[MACAddress]("""fE:dC:bA:98:76:54""") == Some("""fE:dC:bA:98:76:54"""))
assert(validate[MACAddress]("""01:23:45:67:89:AB""") == Some("""01:23:45:67:89:AB"""))
assert(validate[MACAddress]("""01:23:45:67:89:ab""") == Some("""01:23:45:67:89:ab"""))