[Remops] Regualr Expressions for whitelisting
Stefan Claas
admin at zwiebelfreund.de
Tue Jan 26 19:38:02 GMT 2016
On Tue, Jan 26, 2016 at 07:14:28PM +0000, Steve Crook wrote:
> Hi Stefan,
>
> Regexs are very powerful filtering tools, to explain them in detail here
> would be difficult. Here's a very short summary of the format used in
> Mixmaster for white/blacklisting.
>
> To match bob at domain.de:
> /bob\@domain\.de/
> The regex needs to be enclosed in /.../
> Special characters (@ and . in this case) need to be escaped with a
> preceeding backslash.
>
> To match any user at domain.de:
> /domain\.de/
> The regex doesn't need to match from the beginning of a line so this
> will match bob at domain.de and also alice at foo.domain.de.
>
> To match only sub-domains of domain.de:
> /\.domain\.de/
> This matches bob at sub.domain.de but not bob at domain.de.
>
> In all the above instances, domain.de.com would also match because we
> didn't specify the regex must end with anything specific. To match
> domain.de but not domain.de.com:
> /domain\.de$/
> The dollar symbol means match to end of a line.
>
> To match people called bob at any domain:
> /^bob\@/
> The ^ symbol means match from the beginning. In this instance, it
> prevents matching (for example) jimbob at domain.de.
>
> There are virtually infinite possibilities with Regexs but this probably
> covers the bulk of options you're likely to want in a white/blacklist.
>
Hi Steve,
thank you very much for the detailed explanation, which is very helpful
for me.
Best regards
Stefan
--
miniLock ID: AUDETPpz34FaiQcKwV8yw5wgqU22s54UNm1boJPqY7J3L
Please use base64 or base91 for ASCII armor.
More information about the Remops
mailing list