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
/
(?:(.*?)(?=\B'.*?'\B)(?:(\B'.*?'\B))|(.*?)$)
/
gm
Input 1
1
New
My friend's name is 'Adam' and he owns a McDonald's near my son's school. hello 'this' is my'str'ing hi 'john', hi 'john' 'sam's' 'test' things 'test' No apostrophes here. Walmart's prices are low. Sentence with 1 ' apostrophe
Substitution
\U$1\L$2\U$3
My friend's name is 'Adam' and he owns a McDonald's near my son's school. hello 'this' is my'str'ing hi 'john', hi 'john' 'sam's' 'test' things 'test' No apostrophes here. Walmart's prices are low. Sentence with 1 ' apostrophe