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
r"""
(["'])((?!\1)(?:\\\1|.)+?)(?=\1)
"""
gm
Input 1
1
New
// This is a "comment" and should be ignored. //This is also a 'comment' which should be ignored. printf("This is text meant to be \"captured\", and can include any type of character.\n"); // But " must be escaped with a backslash. printf("This is the same as above, only with 'different' nested quotes.\n"); putchar('I'); putchar('\''); printf(""); printf("m thinking."); // First printf is not very useful. printf("\"OK!\""); printf("Hello"); printf(" world!\n"); printf("%d file%s found.\n",iFileCount,((iFileCount != 1) ? "s" : ""); printf("Result is: %s\n",sText); // sText is "success" or "failure". return iReturnCode; // 0 ... "success", 1 ... "error"