convert the level of an inner-table number according to the format. The format is defined as follows (matching the last digits):
Type 1 AAAAA (5 hyphens) ABCDEF
Type 2 AAAA (4 hyphens, excluding 4) ABCDE
Class 3 AAA (3 hyphens, excluding 4) ABCD
Class 4
Class 5, 444 WWXXYY AAAAB
Type 6 AAAB AABB ABAB
other types
the number is fixed line, 11 digits long, the front is the area code, the last 7 digits are the number, the matching rule is the last few digits, for example, AAAAA can be 05311522222
help boss told me how to write the rule, thank you very much