Regex for all url

These are old archives. They are kept for historic purposes only.
Post Reply
Posts: 3
Joined: Fri Aug 22, 2008 7:43 pm

Regex for all url

Post by killerdedieu » Wed Mar 04, 2009 4:31 pm


someone can help me to make and explain me the regex for block all the url

http://[...].[...] <== example :
http://[...].[...]/[...] <== example : or
http://www.[...].[...] <== example :
http://www.[...].[...]/[...] <== example : or
www.[...].[...] <== example :
www.[...].[...]/[...] <== example : or
[...].[...] <== example : (the .ext is major here...)


Posts: 4
Joined: Fri Sep 25, 2009 8:38 pm

Re: Regex for all url

Post by frozenfire » Fri Sep 25, 2009 9:09 pm

(http://)?[A-Za-z0-9\-.]+\.[a-z]+(/[^ ])*

Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: Regex for all url

Post by Jobe1986 » Sat Sep 26, 2009 2:23 pm

frozenfire wrote:(http://)?[A-Za-z0-9\-.]+\.[a-z]+(/[^ ])*
"whoops I missed a space.Now this message will trigger a spamfilter."

Just a tip, TRE regular expressions in UnrealIRCd are case insensitive by default so [A-Za-z] and [a-z] and [A-Z] are all the same UNLESS you force the regex into case sensitive mode.

As for the original post, it's very tricky to block what ahs been requested with a regex without a HIGH percentage of false positives.
Your IP: Image
Your Country: Image

Post Reply