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
/
([\w-]+) \h* (=) \h* ( (["']).*(?!["']) | [\w-]+ )
/
gx
Input 1
1
New
th-is="atest" key=value what = about one, two, three foo = bar and bar=foo OR foobar = "foo,= key=foo,whatever = 'oops' bar" foo=" test " foo ? time IF foo = bar AND bar=foo OR foobar = "foo bar" what = 'if this works' this, is, a, test what="if this works" now=time
Substitution