# remove commas from quoted text strings; $text = "Aaron,\"1223 Main St, USA\",555-555-1212"; print " INBOUND \$text is equal to: $text\n"; $text =~ s/("[\w\ ]*),([\w\ ]+")/\1\2/g; print " OUTBOUND \$text is equal to: $text"; # This produced output as follows: # INBOUND $text is equal to: Aaron,"1234 Main St, USA",555-555-1212 # OUTBOUND $text is equal to: Aaron,"1234 Main St USA",555-555-1212