in reply to Re: capturing words
in thread capturing words

Why not save a little typing and put the captures around the whole "QUEUE(...)" and "RNAME(...)"?

while ( <INPUT> ) { print OUTPUT qq{$1 ------> $2\n} if m{(?x) ^ AMQ8409 .*? ( QUEUE .*? \) ) .* ( RNAME .*? \) ) }; }

You don't need to escape the closing parenthesis in your negated character class, BTW.

Cheers,

JohnGG