title: Why this regex is not working for german words?
body: <p>I am trying to break the following sentence in words and wrap them in span.</p>
  
  <pre><code>&lt;p class="german_p big"&gt;Das ist ein schönes Armband&lt;/p&gt;
  </code></pre>
  
  <p>I followed this:
  <a href="https://stackoverflow.com/questions/2444430/how-to-get-a-word-under-cursor-using-javascript">How to get a word under cursor using JavaScript?</a></p>
  
  <pre><code>$('p').each(function() {
              var $this = $(this);
              $this.html($this.text().replace(/\b(\w+)\b/g, "&lt;span&gt;$1&lt;/span&gt;"));
          });
  </code></pre>
  
  <p>The only problem i am facing is, after wrapping the words in span the resultant html is like this: </p>
  
  <pre><code>&lt;p class="german_p big"&gt;&lt;span&gt;Das&lt;/span&gt; &lt;span&gt;ist&lt;/span&gt; &lt;span&gt;ein&lt;/span&gt; &lt;span&gt;sch&lt;/span&gt;ö&lt;span&gt;nes&lt;/span&gt; &lt;span&gt;Armband&lt;/span&gt;.&lt;/p&gt;
  </code></pre>
  
  <p>so, schönes is broken into three words sch, ö and nes. why this is happening? What could be the correct regex for this? </p>