I don't think  /(?<!( e|\.g)|( i|\.e))\.\s/ does what I think you think it does. If you have Perl version 5.10+ regex extensions, try something like (untested):

my ($exclude) = map qr{ (?: \Q$_\E) (*SKIP) (*FAIL) }xms, join q{|}, qw(e.g. i.e. Dr. Mr. Mrs. ... etc.) ; my $delimiter = qr{ $exclude [.?!] \s }xms;
my ($exclude) = map qr{ (?: $_) (*SKIP) (*FAIL) }xms, join q{ | }, map qq{\Q$_\E}, reverse sort qw(e.g. i.e. Dr. Mr. Mrs. ... etc.) ; my $delimiter = qr{ $exclude [.?!] \s }xms;

I have no idea how you could handle something like "H.G. Wells".

Update: I was a bit too quick with my post; see my update above. Also, I think I might see a way to exclude initialed names and similar things:

my $name = qr{ [[:upper:]] [[:lower:]]+ }xms; my $initialed_name = qr{ \b [[:upper:]] [.] (?= \s+ $name) }xms; my ($exclude) = map qr{ (?: $_) (*SKIP) (*FAIL) }xms, join q{ | }, $initialed_name, map qq{\Q$_\E}, reverse sort qw(e.g. i.e. Dr. Mr. Mrs. ... etc.) ; my $delimiter = qr{ $exclude [.?!] \s }xms;
Obviously, this is just a starting point toward a robust solution.

Update 2: It occurs to me that the above won't handle a name like P.D.Q. Bach, so maybe change  $initialed_name as follows (still untested):

my $initial = qr{ \b [[:upper:]] [.] \s* }xms; my $name = qr{ \b [[:upper:]] [[:lower:]]* }xms; my $initialed_name = qr{ $initial+ (?= \s+ $name) }xms;


Give a man a fish:  <%-{-{-{-<


In reply to Re: End of sentence regex excluding " i.e." and " e.g." by AnomalousMonk
in thread End of sentence regex excluding " i.e." and " e.g." by jabowery

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.