#!/usr/local/bin/perl $text = "Paulson and Federal Reserve Chairman Ben S. Bernanke proposed the plan after the collapse"; $text =~ s/\b[^<]S\.[^=]\b/\/g; print "$text\n"; #### Paulson and Federal Reserve Chairman BenBernanke proposed the plan after the collapse #### Paulson and Federal Reserve Chairman Ben Bernanke proposed the plan after the collapse