Search & Filtering (Rejecting) Executable Attachments

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Search & Filtering (Rejecting) Executable Attachments

Postby Dominus » Thu Aug 13, 2020 5:12 pm

I have
Code: Select all
\.[Ee][Xx][Ee](\?|$)
as an expression to search by as suggested on a regex site.

When I search a group the results are lacking.

I shortened the expression to
Code: Select all
\.[Ee][Xx][Ee]
and the results are vastly different.

Can someone explain the difference in the expressions as it applies to newsbin?

I am not skilled in regex.
Dominus
n00b
n00b
 
Posts: 2
Joined: Sat Feb 29, 2020 10:06 am

Registered Newsbin User since: 02/27/20

Re: Search & Filtering (Rejecting) Executable Attachments

Postby Quade » Thu Aug 13, 2020 5:27 pm

"[.]exe" is all you need. It's case independent so you don't have to worry about upper or lower case.

"[.]exe(\s\"|$)" would be more precise. It means ".exe followed by space, quote or end of line".

"\.[Ee][Xx][Ee](\?|$)"

Is more complicated than you need.

Keep in mind when you use our internet search, it works more like google and doesn't use regular expressions. You can apply a regular expression after you search though in order to filter the results down.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 43871
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 1 guest

cron