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
@
(?=([^"\\]*(\\.|"([^"\\]*\\.)*[^"\\]*"))*[^"]*$)//.*$
@
gm
Input 1
1
New
// jkkkk "But remove this ha ha" kkkko909090 char * foo = "//don't remove // really please don't"; // "But remove this ha ha!" // along with this! "//shall not be removed" char *bad_regex_strategy = "\"good luck\" // \"counting the \"quotes\"" "//\"//"; // \"ha""" \" " \" ha ha\" ha /// "\;"ha'
Extraction
// jkkkk "But remove this ha ha" kkkko909090 char * foo = "//don't remove // really please don't"; // "But remove this ha ha!" // along with this! "//shall not be removed" char *bad_regex_strategy = "\"good luck\" // \"counting the \"quotes\"" "//\"//"; // \"ha""" \" " \" ha ha\" ha /// "\;"ha'