Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Regular Expression - SPAM Block URL

Posted on 2013-10-24
6
Medium Priority
?
1,909 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
Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

 
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 feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses

618 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