I have a text like:
Word word word <a href=google.com>word word word</a> word word word
I need the positions of spaces, which are not enclosed by any html tag - positions of spaces underlined below:
Word_word_word_<a href=google.com>word word word</a>_word_word_word
What regex should I use (in preg_match())?