On 10/21/2011 12:13 PM, R - elists wrote: > >> There are a couple of ways to do it. >> >> If you know that the numbers are 1-9, you could do this: >> >> header __LOCAL_MAILENGINE ALL =~ /mailengine[1-9]\.com/i >> >> (this is matching a single character. You could NOT do [1-12]) >> >> If you just want to allow for a number, you could do this: >> >> header __LOCAL_MAILENGINE ALL =~ /mailengine\d+\.com/i >> >> This one matches a number of any length. >> >> For more information, do a search for Perl regular expressions. >> >> -- >> Bowie >> > Bowie, > > thank you > > what about the case of non numeric WHATEVERLEGALCHARS, ie any legal > character in a domain name replacing the number series? > > i.e. > > header __LOCAL_MAILENGINE ALL =~ /mailengineWHATEVERLEGALCHARS\.com/i > > i do understand that it would be similar to a catchall, yet still interested > in knowing in cases of funkiness ;-)
In that case, I would use a negative character class. header __LOCAL_MAILENGINE ALL =~ /mailengine[^.]+\.com/i [^.] means any character that is not a period + means one or more -- Bowie