Find . (periods) before and after the insertion
<p>I would like to find the second . (periods) before and after a insertion in a div with contentEditable attribute set to TRUE. </p>

<p>For example, if I got that string into a div</p>

<pre><code>&lt;div contentEditable&gt;           
  Lorem ipsum dolor. Sit amet, consectetur adipiscing elit. Duis semper nisl eget 
  neque feugiat consectetur. Vivamus sed mi quis dui sodales euismod et id erat. 
  Cras feugiat interdum ligula, vel. Fermentum orci accumsan quis. Donec ut lacus 
  ipsum, sit. Amet accumsan enim.
&lt;/div&gt;
</code></pre>

<p>If someone insert something (with a right-click or with the keyboard directly), I would like to know where he insert his text, and find the second period before and after his insertion, to put a <code>&lt;br/&gt;</code> just after the two periods.</p>

<p>Here, if someone insert somethink like "New text" between "Vivamus" and "sed", I would like to do that:</p>

<pre><code>&lt;div contentEditable&gt;           
  Lorem ipsum dolor. Sit amet, consectetur adipiscing elit.&lt;br/&gt; Duis semper nisl eget 
  neque feugiat consectetur. Vivamus sed mi quis dui sodales euismod et id erat. 
  Cras feugiat interdum ligula, vel.&lt;br/&gt; Fermentum orci accumsan quis. Donec ut lacus 
  ipsum, sit. Amet accumsan enim.
&lt;/div&gt;
</code></pre>

<p>I really don't know how to locate the insertion and how to find the periods (I successed with <code>.find(":contains('.')")</code>, but i think there is another better solution...)</p>

<p>Thanks in advance for helping!</p>
