ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Regular expression pattern for exclussions
zmandel


Joined: 19 Apr 2008
Posts: 0
Location: Peru
Reply with quote
On Clamwin preferences, Filters tab, there is some text stating that you can specify a regular expression by using <>.
However, there are several regular expression syntaxes arround, its not standard. What syntax to use? I couldnt find it anywhere on the web.
For example, do \ need to be escaped as in \\ ? It would be useful if the dialog was a little taller with a text example of a regular expression, with a simple example, like how to exclude an entire directory from the scan.
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
clamwin will escape \ into \\ internally

to exclude all filesand subfolders under c:\test:
<C:\test\.*>

There are a few RegEx guides online. For RegEx syntax you may use this one:
https://docs.python.org/lib/re-syntax.html
View user's profileSend private message
Previous example doesnt work
zmandel


Joined: 19 Apr 2008
Posts: 0
Location: Peru
Reply with quote
the previous post says that clamwin internally escapes \. It appears that this is NOT the case.
I just tested it and you must escape the \ yourself to \\. So a simple example, to exclude c:\test you will need to add:
<c>

When I wrote that I couldnt find it anywhere on the web, i didnt mean a regex guide, there are lots arround. I meant that there are different syntaxes and are not standard, so just saying "use a regular expression" is not enough, it needs more detail. An example would be the escaping of \.

I think it needs to have an example on the dialog itself.
View user's profileSend private message
again
zmandel


Joined: 19 Apr 2008
Posts: 0
Location: Peru
Reply with quote
The messsage board is getting confused about double backslash so my example doesnt show right in my previous post.
The simple example should look like the example given by alch, but double-backslash everywhere there is a \
View user's profileSend private message
Regular expression pattern for exclussions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic