in reply to Re: Advanced replace function
in thread Advanced replace function

 qr// automatically wraps its expression in a non-capturing group:

>perl -wMstrict -le "my $regex = qr'(?:\[.*?\])'; print $regex; " (?-xism:(?:\[.*?\]))