ECHAR rule simplified by using lastChar