in reply to Re: Splitting a Sentence
in thread Splitting a Sentence

Try this one on for size:

[A-Z].+?[.;](?<!\.{3})(?=[^.;][A-Z]|\s*$)

Replies are listed 'Best First'.
Re^3: Splitting a Sentence
by AppleFritter (Vicar) on Jul 03, 2014 at 16:34 UTC

    Works like a charm. BTW, I was gonna say that

    m/[A-Z].+?[.;](?<!\.{2,})(?=[^.;][A-Z]|\s*$)/g

    would perhaps be even better, so as to not hardcode any specific number of periods for run-on sentences, but it turns out that:

    Variable length lookbehind not implemented in regex m/[A-Z].+?[.;](?<! +\.{2,})(?=[^.;][A-Z]|\s*$)/

    Sigh. (Oh well, at least there's workarounds; see Why is variable length lookahead implemented while lookbehind is not?.)