Skip to content

EurCurrency

Giuseppe Cannella edited this page Feb 19, 2020 · 2 revisions
Type name example
EurCurrency 133,89 €
import com.github.gekomad.regexcollection.EurCurrency
import com.github.gekomad.regexcollection.Validate.validate

assert(validate[EurCurrency]("00,00 €") == None)
assert(validate[EurCurrency]("0,00 €") == Some("0,00 €"))
assert(validate[EurCurrency]("1,-- EURO") == Some("1,-- EURO"))
assert(validate[EurCurrency]("1 234 567,89 EUR") == Some("1 234 567,89 EUR"))
assert(validate[EurCurrency]("1 234 567,89 €") == Some("1 234 567,89 €"))
assert(validate[EurCurrency]("133,89 €") == Some("133,89 €"))
assert(validate[EurCurrency]("133,89 EUR") == Some("133,89 EUR"))
assert(validate[EurCurrency]("133,89 EURO") == Some("133,89 EURO"))
Clone this wiki locally