Skip to content

Instantly share code, notes, and snippets.

@mcsee
Created December 2, 2020 15:48
Embed
What would you like to do?
val prefix = "\\+"
val digit = "[0-9a-zA-Z]"
val space = "[– -]"
val phoneRegex = Regex("^$prefix(?:$digit$space?){6,14}$digit$")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment