I'm searching for a regex to find the last occurence of a space in my text but I'don't want to find a space from in a HTML tag.
"This is a string with <strong>some</strong> html in it"
The space that the regexp should find is the one between in and it. That regex is not so difficult. The same regex would also work here:
"This is a string with <strong>some</strong> html in <a href="">the end</a>"
The space would be now in the HTML between the and end (ok!)
But when my string is:
"This is a string with <strong>some</strong> html in the <a href="">end</a>"
Then the space should be between the and <a and not between <a and href="">end<a>.
Anyone some idea?
 
    