Regular Expression - SPAM Block URL

I need a regular expression that do detect a URL that contains a file ending with certain extensions, example below:
http://54.200.175.233/boleto/NF4354.zip
http://example.org.br/ex.zip
https://example.com.br/teste.exe
What better way to prepare this regular expression that detects various formats that URL?
Thank you
Marcelo
fmarcelo14Asked:
Who is Participating?
 
mark_harris231Commented:
Agree with dan_blagut - you can see an example very close to what you want at the top of page 291  (NOTE: page numbers reference the numbers printed on the page, not the PDF page count).

This should do what you want:

http://.*?\.(exe|bin|zip)

Points to Dan...
0
 
dan_blagutCommented:
Hi

did you try some pattern like http://*.exe or http://*.zip? What antispam do you use?

dan
0
 
fmarcelo14Author Commented:
Hi,
I have AntiSpam Ironport and I need use regular expression, your suggestion does not meet the format of regular expression.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
dan_blagutCommented:
0
 
Derek JensenCommented:
you might also need to escape your //'s (to avoid delimiter errors):

http:\/\/.*?\.(exe|bin|zip)

Open in new window

0
 
dan_blagutCommented:
Thank's Mark
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.