Regular Expressions 101

Community Patterns

Match CLI argument to

0

Regular Expression
Java 8

"
(?<=-{1,2})(?:to?)=?\s*([^\s]*)\s*
"
gm

Description

Matches argumetn to as:

  • -t
  • --to
  • -t= ...
Submitted by rperez-torro - 2 years ago