in reply to Remove double bracket and singe quotes

You can do this with just one regex:
use strict; use warnings; my $input = "'C-3PO' or 'See-Threepio' is a humanoid robot character f +rom the [[Star Wars]] universe who appears in the original ''Star War +s'' films, the prequel trilogy and the sequel trilogy."; my $regex = qr/('|\[\[|\]\])/; $input =~ s/$regex//g; print $input;