detect the 4 patterns
* after separating the last digit