Try instructing your regular expression to include all characters BUT the character that begins an HTML tag:
I have an internal link system on my site, and I currently use this to detect text after a markup:
The problem with this is that it picks up characters like "<", meaning if someone uses a line break, the result will be this:
http://www.[sitename].org/[user's url] <br/>
What would be a better regex expression for that? Thanks.