[Linux-aus] python regex

Daniel Black daniel.subs at internode.on.net
Tue Oct 8 07:15:49 EST 2013


On 07/10/13 18:55, Nick Edwards wrote:
> On 10/7/13, Daniel Black <daniel.subs at internode.on.net> wrote:
>>
>> <HOST> is a fail2ban ism for matching a IP host and it isn't part of
>> python regex.
>>
> 
> Yes, I am aware of that, it is _after_ that, I care about
> 
> it is python regexing, the host bit was an example as to the last
> thing in my regex string
> 
>>> TLS/SSL connections will only match  rip=(?P<host>\S*),.*
>>>
>>> But plain connections will only match on rip=(?P<host>\S*)
>>
>> fail2ban matches on logs as it doesn't listen to network connections
> 
> Yes, I also know this too
> 
> what I am after is a python regex that matches on   "" or "foo"

(|foo)



More information about the linux-aus mailing list