Do things semantically instead of by regex