I have a forum on which users can use the CKEditor to make links. However, some users just post the raw url, resulting in some links nice formatted and some links not.
I'd like to make a filter based on a regex to make links of the raw urls. However, I'm stuck at making the regex. Requirements:
- Matches http://... in normal HTML tags (
<b>,<p>,blockquote, ...) - Does not match anything in the
<a>tag - Does not match anything which is an HTML attribute (
<a href="http://...">)
What regex can I use?