String replacement

Ranadhir Nag

Ranch Hand

Posts: 138

posted 9 years ago

How do we prepend all expressions in a specified list,with an excape character,in the shortest possible way. Suppose ,we have a string - "Are+we @in /for a ? surprise" We need an output string which looks like "Are\+we \@in \/for a \? surprise" What is the smartest way of achieving this?