My trusty "JavaScript - The Definitive Guide" (1998 - 3rd Edition) agrees with your basic premis that '.' is "Any character except newline, equivalent to [^\n]". So, [.\n] is adequate; you are correct in omitting the '|' - that was my bad! I suppose that [.\s] would be belt-and-braces just in case you were generating text on a Windows system and processing it on a Unix system and that the RegExp coders had forgotten that Windows uses \r\n instead of \n.