RegExp Filtering

80 views
Skip to first unread message

Klaus Gundermann

unread,
Sep 10, 2020, 8:48:03 AM9/10/20
to e2guardian
I'm looking for documentation how to exactly define regex filters, eg. for 
> regexpboollist = 'name=banned,messageno=503,path=__LISTDIR__/bannedregexpurllist'

I've found examples for regexpreplacelist where can you write:
> "old"->"new"

but how to use regexp in regexpboollist ?
- do I have  to use double quotes around the expression ?
- do I have to match the whole line (implizit ^and $) ?
- could I  match http/https   prefix ?

Klaus Gundermann

unread,
Sep 10, 2020, 8:53:43 AM9/10/20
to e2guardian
Oh, I see there is an error message when starting e2guardian:
> Error compiling regexp:http\:\/\/((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\

and it then ignores the complete rest of the file?!

But I checked the regexp with https://regex101.com/ and https://www.debuggex.com/ 
and it seems to be ok ..

Klaus Gundermann

unread,
Sep 10, 2020, 11:08:44 AM9/10/20
to e2guardian
Note to myself:
- use the expression WITHOUT double quotes
- you can match only part of the line
- no, you can't match on http/https
- there seems to be a problem, when the patterns ends on an escaped forward slash \/
  ( I will try to debug this )


Klaus Gundermann schrieb am Donnerstag, 10. September 2020 um 14:48:03 UTC+2:

Philip Pearce

unread,
Sep 14, 2020, 12:14:19 PM9/14/20
to Klaus Gundermann, e2guardian
@Klaus  While looking at the time issue I came across the code that is causing this problem, so it should be fixed in the latest v5.4.dev.

Regards
Philip


--
E2guardian:
https://groups.google.com/d/forum/e2guardian
Github:
https://github.com/e2guardian/e2guardian
Follow us on twitter:
https://twitter.com/e2guardian
---
You received this message because you are subscribed to the Google Groups "e2guardian" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e2guardian+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/e2guardian/64279fa0-a628-44a6-8e37-9d2b6a30bae0n%40googlegroups.com.

kd.gun...@googlemail.com

unread,
Sep 15, 2020, 7:56:11 PM9/15/20
to e2guardian
Oh, Great ! Thanks Philip
Reply all
Reply to author
Forward
0 new messages