Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
((?:|^\b|\s+)--(?<option_1>.+?)(?:\s|=|$)(?!-)(?<value_1>[\"\'].+?[\"\']|.+?(?:\s|$))?|(?:|^\b)-(?<option_2>.)(?:\s|=|$)(?!-)(?<value_2>[\"\'].+?[\"\']|.+?(?:\s|$))?|(?<arg>[\"\'].+?[\"\']|.+?(?:\s|$)))
/
gm
Input 1
1
New
--in-argument hello --out-stdout false positional -x --in-argument 'hello world" "filename" --in-argument="hello world' --in-argument='hello' --in-argument hello "hello" helloworld --flag-off -v -x="hello" -u positive C:\serverfile --in-arg1='abc' --in-arg2=hello world c:\\test