Python: use regular expression to remove the white space from all lines,"re.sub('(?m)^[^\\S\\n]+', '', '  a\n b\n c\nd  e')"