[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Regular Expression - SPAM Block URL

Posted on 2013-10-24
6
Medium Priority
?
1,939 Views
Last Modified: 2013-10-29
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
0
Comment
Question by:fmarcelo14
6 Comments
 
LVL 22

Expert Comment

by:dan_blagut
ID: 39599827
Hi

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

dan
0
 

Author Comment

by:fmarcelo14
ID: 39599980
Hi,
I have AntiSpam Ironport and I need use regular expression, your suggestion does not meet the format of regular expression.
0
 
LVL 22

Expert Comment

by:dan_blagut
ID: 39600086
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 10

Accepted Solution

by:
mark_harris231 earned 2000 total points
ID: 39600413
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
 
LVL 9

Expert Comment

by:Derek Jensen
ID: 39601272
you might also need to escape your //'s (to avoid delimiter errors):

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

Open in new window

0
 
LVL 22

Expert Comment

by:dan_blagut
ID: 39608913
Thank's Mark
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question