Regular Expressions 101

Community Patterns

Command with arguments

0

Regular Expression
ECMAScript (JavaScript)

/
^(?:(.+)(?:(?:\| )(--(?!-).+))|(.*))$
/

Description

This will parse command with/without arguments like:

command --arg1=string --arg2=string
Submitted by anonymous - 5 years ago