clarify error message
fix regular expression
handle inline comments