Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?<!(i|e))[.,!?][a-zA-Z0-9]
/
gm
Input 1
1
New
The problem: Match lack of space following a fullstop/period. BUT! don't match on "i.e." and "e.g." The current attempt above is not robust, only matches the "i" of "i.e." and "e" of "e.g." and, worse, allows all other sentences ending with "i" or "e". Example source: PASS: This is a test (i.e. something).Match M with no space. Don't match i.e. PASS: This is a test (e.g. Something).Match M with no space. Don't match e.g. PASS: This is a test (q.v. something).Match M with no space. DO match .v (not required) PASS: This is a test.match the m. PASS: Is this a test?Match the M. PASS: This is a test!Match the M. These all fail: (?<!(i\.e|e\.g))[.,!?][a-zA-Z0-9] (?<!(i\.e\.|e\.g\.))[.,!?][a-zA-Z0-9] (?<!(i\.e|e\.g))(\.|\!|\?)\s+“?[a-z] Current working copy: (?<!(i|e))[.,!?][a-zA-Z0-9]