Skip to content
Giuseppe Cannella edited this page Feb 19, 2020 · 6 revisions
Type name example
HEX hex code with or without #
#F0F0F0
F0F0F0
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.HEX

assert(validate[HEX]("#FAFAFA") == Some("#FAFAFA"))
Type name example
HEX1 hex code with #
#F0F0F0
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.HEX1

assert(validate[HEX1]("#FAFAFA") == Some("#FAFAFA"))
Type name example
HEX2 hex code with # or 0x
#F0F0F0
0xF0F0F0
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.HEX2

assert(validate[HEX2]("#FAFAFA") == Some("#FAFAFA"))
Type name example
HEX3 hex code with 0x
0xF0F0F0
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.HEX3

assert(validate[HEX3]("0xFAFAFA") == Some("0xFAFAFA"))
Clone this wiki locally