[prev in list] [next in list] [prev in thread] [next in thread]
List: exim-users
Subject: Re: [exim] Regexps (was: ACL filtering)
From: Always Learning <exim.users () exim1 ! euro2 ! net>
Date: 2010-04-24 13:57:44
Message-ID: 2010-04-24.14-58-00.358248F6 () relay
[Download RAW message or body]
Eduardo M KALINOWSKI wrote on Sat, 24 Apr 2010 10:19:58 -0300.
> On 04/23/2010 09:11 PM, Always Learning wrote:
>> [a](1) = match only one 'a'
> No, that would match an 'a', followed by a '1', storing the 1 in a
> matched group. To specify the number of matches one uses curly braces:
> {1}. However, it is redundant to specify {1}: if you want exactly one
> match, just specify what you want matched. "[a]{1}" and "[a]" are the same.
>
> Furthermore, [...] means one of the characters inside the brackets:
> "[ab]" is either a or b. If there is only one character, there is no
> need for brackes: just specify them.
>
> In short, to match one 'a', use "a".
Thank you for explaning the {1}.
>> [-_.](?) = match next character which should be one or nil occurrences
>> of .-_
> To match zero or one of an expression, use "?", not "(?)" (which is
> seems like an illegal regexp - I wonder how it gets parsed). And I
> believe you meant one or nil of one of the characters .-_
Would one use [-_.]{?}, being similar to [a]{2}, rather than only [-_.]?
or is '?' a special character in RegExp ?
> While to geared towards exim, these tutorials are quite useful:
> http://perldoc.perl.org/perlrequick.html
> http://perldoc.perl.org/perlretut.html
>
> Or google "regexp tutorial", there's bound to be dozens of useful resources.
I'll read them as soon as I can. Thank you for the URLs.
Regards,
Paul.
--
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic