in reply to Somewhat basic but long, practical RE problem

Just a stylistic comment: you can use the \S where you use the equivalent [^\s], giving you a somewhat less cluttered looking RE. And you don't need the backslash before the right square bracket outside the character class.