-
Notifications
You must be signed in to change notification settings - Fork 0
Scientific
Giuseppe Cannella edited this page Feb 19, 2020
·
2 revisions
| 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"))