OK, I got as far as I could on my own.
I need help with regex in .htaccess
I have this link:
<a href="http://www.mydomain.com/link;http://www.domain.com">http://www.domain.com</a>
Now I would like to add a rewrite rule to my .htaccess file to do something like this
RewriteRule ^/link;(http://.*)$ incl/externalLink.inc.php?URL=$1 [NC,L]
i.e. if URL has /link;http:// pull incl/externalLink.inc.php page and pass external URL as a var $URL.
I'm in the deep dark woods at the moment.