add basic text test, and convert tabs to spaces
simpler comment pattern using lazy match
improved function pattern