in reply to split $data, $unquoted_value;

Heres my go. It assumes that if a quote is used as a quote it won't be surrounded on both sides by an alpha char.

$_=<<END; this is some text. A period (".") usually terminates a statement. But not if it's quoted. Regardless of whether or not single quotes, '.', are used. END #' my $accept=qr/(?: (?<![a-z]) (?: [''] (?:[^''\\]+|\\.)* [''] | [""] (?:[^""\\]+|\\.)* [""] ) (?![a-z]) | [^\\''"".]+ | [''""] )+/xi; my @parts; while (/($accept|([.][\r\n]*))/gxi) { push @parts,$1 unless $2; } print "part1: $_\n" for @parts; my @parts2=split / (?!$accept)([.][\r\n]*)/xi, $_; print "---\n"; print "part2: $_\n" for @parts; __END__ part1: this is some text part1: A period (".") usually terminates a statement part1: But not if it's quoted part1: Regardless of whether or not single quotes, '.', are used --- part2: this is some text part2: A period (".") usually terminates a statement part2: But not if it's quoted part2: Regardless of whether or not single quotes, '.', are used

Just in case anyone wonders, the [''] trick is harmless, perl just ignores dupes in a char class, but it keeps some syntax highlighting editors (like mine) from getting confused.

---
$world=~s/war/peace/g