Type recognition based on char locations in BE string instead of using the contains function