Classify string with escape character