Ok thank you! So tr does not do all regexp metachars such as \d \D \s \S \w \W? is \s+ is whitespace, why didn't s/^\s+|\s+$//g work on these empty lines? So \S is non-whitespace so essentially it is ???