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
/
([A-Za-z_]\w*)[ \t]*=[ \t]*('[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"|[^\r\n#]*)
/
g
Input 1
New
# The following are valid ONE = This is ONE TWO=This is TWO THREE="This is 'THREE'" FOUR = "This is \"FOUR\"" fi_ve = 'This is \'FIVE\'' six='This is "SIX"' NUMBER7="This is SEVEN" # Comment for SEVEN number8="This is EIGHT"#Comment for EIGHT NINE="This is #9" TEN=This is #10 ELEVEN= TWELVE=10 THIRTEEN=TRUE FOURTEEN="true" FIFTEEN=false SIXTEEN='FALSE' # The following are invalid (incl. empty line) 17="Is not valid because the key is a number" ="Is also not valid because the key is missing"