Skip to content
Giuseppe Cannella edited this page Feb 19, 2020 · 8 revisions
Type name example
IP 10.164.108.1
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.IP
assert(validate[IP]("1011.164.108.1") == None)
assert(validate[IP]("10.164.108.1") == Some("10.164.108.1"))
Type name example
IP1 10.164.108.1:80
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.IP1
assert(validate[IP1]("101.164.108.1") == None)
assert(validate[IP1]("101.164.108.1:80") == Some("101.164.108.1:80"))
Clone this wiki locally