On Wed, May 19, 2021 at 11:39:46AM -0500, Skip Montanaro wrote: > > > Yes, use character sets, e.g. [+] and [-]. > > > Plus "+" is special. Minus "-" is not. > ... > > Or escape with backslash. Note that due to string syntax you need > > two of them. > > Yes, correct you are, Tomas. I long ago got used to putting most > punctuation in character sets regardless of its specialness, if for no > other reason than to help them stand out when rereading the code > later [...] Right: brackets help curbing the multiplication of backslashes. I've found another strange application for that: "ps waux | grep foo" will find your "grep foo" in the process list. Decorating one of your characters in "foo" with brackets will fix that. Hacky, but it works :) Cheers - t