by phaemon · 12y ago · 0 comments
I didn't bother reading through what you had to say simply because I'm a little tired and you deliberately made it more difficult for me.
I'm sure a Javascript programmer would come up with some better solution instead?...
local $/;
$_= <>;
s/<(.*?)>/$id++; $t{$id}=$1; "<$id>"/sge;
s/([.?!][^\w].*?)([a-zA-Z])/$1.uc($2)/sge;
s/<(.*?)>/"<$t{$1}>"/sge;
s/(<[pP]\b[^>]*>\s*)([a-z])/$1.uc($2)/sge;
print;
Edit: changed \. to [.?!] in line 4.