I'd like to extract every word seperately from any phrase. I also need to match special characters, such as umlauts.
Currently, I use this:
preg_match_all('/\b([a-zA-ZäöüåÄÖÜÅ]*)\b/', $string, $matches);
However, this gives me redundant and empty matches. For example, "zu spät" returns
Array ( [0] => Array ( [0] => zu [1] => [2] => spät [3] => )
[1] => Array ( [0] => zu [1] => [2] => spät [3] => ) )
What is the correct expression to match "any letter"? What can I do about the double and empty matches?