#!/usr/bin/perl # bareword.pl use strict; use warnings; my $select="this isn't a'regular 'expression"; print $select."\n"; my $stripped = $select =~ s/ ( ' .*? ' ) /'_' x length $1/egrx; print $stripped."\n"; print $1."\n"; print $select."\n";