I think I found part of why it is different:<br><br><span class="q">sentences = re.split(r&#39;((?:\.|\?|!|\n\n)\s*)&#39;, msg)</span><br><br>is not splitting msg correctly because windows and unix have different newline characters.(?)
<br><br>try:<br><br><span class="q">sentences = re.split(r&#39;((?:\.|\?|!|\n\n|\r\n)\s*)&#39;, msg)</span><br><br>references:<br><a href="http://en.wikipedia.org/wiki/Newline#Newline_in_programming_languages">http://en.wikipedia.org/wiki/Newline#Newline_in_programming_languages
</a><br><a href="http://www.python.org/dev/peps/pep-0278/">http://www.python.org/dev/peps/pep-0278/</a><br><br>-isaac<br><br><div><span class="gmail_quote">On 3/5/07, <b class="gmail_sendername">Bob Ippolito</b> &lt;<a href="mailto:bob@redivi.com">
bob@redivi.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 3/5/07, wesley chun &lt;<a href="mailto:wescpy@gmail.com">
wescpy@gmail.com</a>&gt; wrote:<br>&gt; On 3/4/07, Isaac &lt;<a href="mailto:hyperneato@gmail.com">hyperneato@gmail.com</a>&gt; wrote:<br>&gt; &gt; This will capitalize the &quot;I&quot; and &quot;I&#39;ve&quot; and keep the original capitals in
<br>&gt; &gt; the &#39;msg&#39;.<br>&gt; &gt; Thanks for the inspiration. I had a great time hacking!<br>&gt;<br>&gt;<br>&gt; is there a way to generalize &quot;i&#39;&quot;?&nbsp;&nbsp;you&#39;d need to support &quot;i&#39;m&quot;,
<br>&gt; &quot;i&#39;d&quot;, &quot;i&#39;ll&quot;, etc.<br>&gt;<br>&gt; finally, is there a way to incorporate all your code into gmail so<br>&gt; that it does it automagically when i click &quot;send&quot;?&nbsp;&nbsp;:-)<br><br>
Rewrite it in JavaScript and use Greasemonkey? The code would<br>practically be the same since it&#39;s mostly just regex sludge.<br><br>-bob<br></blockquote></div><br>