-
Notifications
You must be signed in to change notification settings - Fork 0
Coordinate2
Giuseppe Cannella edited this page Feb 19, 2020
·
2 revisions
Type name | example |
---|---|
Coordinate2 | 12:12:12.223546"N |
import com.github.gekomad.regexcollection.Coordinate2
import com.github.gekomad.regexcollection.Validate.validate
assert(validate[Coordinate2]("""12.2225""") == None)
assert(validate[Coordinate2]("""15.25.257S""") == None)
assert(validate[Coordinate2]("""AA:BB:CC.DDS""") == None)
assert(validate[Coordinate2]("""12:12:12.223546"N""") == Some("""12:12:12.223546"N"""))
assert(validate[Coordinate2]("""12:12:12.2246N""") == Some("""12:12:12.2246N"""))
assert(validate[Coordinate2]("""15:17:6"S""") == Some("""15:17:6"S"""))
assert(validate[Coordinate2]("""12°30'23.256547"S""") == Some("""12°30'23.256547"S"""))