in reply to Re: Advanced replace functionin thread Advanced replace function
qr// automatically wraps its expression in a non-capturing group:
>perl -wMstrict -le "my $regex = qr'(?:\[.*?\])'; print $regex; " (?-xism:(?:\[.*?\])) [download]