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
~
(".*?"|(?<!\\)'.*?(?<!\\)')(*SKIP)(*FAIL)|\?
~
sg
Input 1
This is my test ? I "stole ""?"" it from s/o" I "stole ? it from s/o" I "stole '?' it from s/o" I 'stole "?" it from s/o' "?" look like it works pretty well ? 'this is a question mark - ?' 'this is a double-quoted question mark - "?"' ? 'this is a single-quoted question mark - \'?\'' ? 'this is a ? badger\'s question mark ? where is the monkey\'s\'' ?
Extraction
This is my test ? I "stole ""?"" it from s/o" I "stole ? it from s/o" I "stole '?' it from s/o" I 'stole "?" it from s/o' "?" look like it works pretty well ? 'this is a question mark - ?' 'this is a double-quoted question mark - "?"' ? 'this is a single-quoted question mark - \'?\'' ? 'this is a ? badger\'s question mark ? where is the monkey\'s\'' ?