Scientific - gekomad/scala-regex-collection GitHub Wiki
Type name | example |
---|---|
Scientific | -2.384E-03 |
import com.github.gekomad.regexcollection.Scientific
import com.github.gekomad.regexcollection.Validate.validate
assert(validate[Scientific]("10.1") == None)
assert(validate[Scientific]("100") == None)
assert(validate[Scientific]("3.7E-11") == Some("3.7E-11"))
assert(validate[Scientific]("-2.384E-03") == Some("-2.384E-03"))
assert(validate[Scientific]("9.4608e15") == Some("9.4608e15"))