in reply to Re: How do I strip lines prefixed by a
in thread How do I strip lines prefixed by a "#"

That first regexp should have read: s/\s*#.*//;