[rabbitmq-discuss] Permissions for aliveness-test user

Matthias Radestock matthias at rabbitmq.com
Mon Nov 26 10:50:35 GMT 2012


Jean Paul,

On 26/11/12 10:41, Jean Paul Galea wrote:
> On 11/26/2012 11:30 AM, Matthias Radestock wrote:
>> Ah, that's because that regexp is rather wrong and will in fact match
>> anything. I think you meant ^(aliveness-test|)$'.
>
> Actually I think the regex is fine.

It's not fine; without the grouping it matches everything.

 > re:run("foo", "^aliveness-test|$", [{capture, none}]).
match

> It seems that round brackets are not
> supported by the regex engine and are taken as literals instead.

Grouping *is* supported:

 > re:run("aliveness-test", "^(aliveness-test|)$", [{capture, none}]).
match
 > re:run("foo", "^(aliveness-test|)$", [{capture, none}]).
nomatch

Regards,

Matthias.


More information about the rabbitmq-discuss mailing list