in reply to Re^2: Remove double bracket and singe quotes
in thread Remove double bracket and singe quotes

$doc =~ s/(?<!\')\'(?!\')//g;

The above seems to work for OP's example. Only matches single "'" by using negative look-behind and negative look-ahead assertions to avoid matches of more than one consecutive single quote.

Replies are listed 'Best First'.
Re^4: Remove double bracket and singe quotes
by smknjoe (Beadle) on May 04, 2016 at 23:47 UTC
    Excellent! I've never had a need to use look-ahead/look-behind in any of my scripts, so this is new territory for me.