Solved

Regular Expression - SPAM Block URL

Posted on 2013-10-24
6
1,796 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

 
LVL 10

Accepted Solution

by:
mark_harris231 earned 500 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
This video discusses moving either the default database or any database to a new volume.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

729 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