Improved handling of underscores, carets, and dashes.