reverse match class lookup replacing symbols with string