<p>Here's the problem:</p>

<pre><code>split=re.compile('\\W*')
</code></pre>

<p>This regular expression works fine when dealing with regular words, but there are occasions where I need the expression to include words like <code>k&amp;amp;auml;ytt&amp;amp;auml;j&amp;aml;auml;</code>.</p>

<p>What should I add to the regex to include the <code>&amp;</code> and <code>;</code> characters?</p>

You probably want to take the problem reverse, i.e. finding all the character without the spaces:
```
```
[^ \t\n]*
```
```
Or you want to add the extra characters:
```
```
[a-zA-Z0-9&;]*
```
```
In case you want to match HTML entities, you should try something like:
```
```
(\w+|&\w+;)*
```
```