Skip to content

Instantly share code, notes, and snippets.

@juan-medina
Last active January 1, 2020 11:05
Show Gist options
  • Select an option

  • Save juan-medina/5383be19a5141766a341bc56586b83d0 to your computer and use it in GitHub Desktop.

Select an option

Save juan-medina/5383be19a5141766a341bc56586b83d0 to your computer and use it in GitHub Desktop.
VerbalExpression regex = regex()
.startOfLine()
.then("+")
.capture().range("0", "9").count(3).maybe("-").maybe(" ").endCapture()
.count(3)
.endOfLine().build();
VerbalExpression regex = expresion {
line {
any()
group {
range ("0", "9")
maybe("-")
maybe(" ")
count(3)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment