cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1242
Views
0
Helpful
1
Replies

Double extension

Dears,

how can we block double extension ?

can someone tell me the regular expresion for it?

thanks            

1 Reply 1

Andreas Mueller
Level 4
Level 4

Hi Bechara,

should be something like  \..*\..*$ 

.\ means a dot, this one needs to be escaped woth the backslash

.* means a string with any number of characters

If you want to restrict that to three letter extensions only (i.e. .exe.pif), then a quick and dirty way would be like this:

\....\....$

Hope that helps,

Andreas