Pattern for non-port-80/443 sites

: Function ereg_replace() is deprecated in /mozdev/sandbox/php/include/globals.h on line 95.

Here's a simple regex that matches URLs with a port specification. Certain websites do this in order to serve pages on ports other than 80 (HTTP) or 443 (HTTPS). Many corporate firewalls block non-HTTP/HTTPS traffic, so this pattern can help with that:

https?://.*\..+\..+:\d+/.*

Examples of matching URLs:

https://foo.bar.net:4067/
http://mail.foo.com:8080/inbox/msg102.htm#subject?style=elegant

Note the colon and number after the domain.

I hope it can be of use. Any questions, please post them in the forum.

Cheers,
doonyakka