The only pattern I can see is that you have either letters followed by digits, or digits followed by letters, or letters only.

From this point, the first step would be to separate the string into the beginning and the end, then to separate each part into a group of one or two entities:

"AB12-ZZ789" → ["AB12", "ZZ789"] → [["AB", "12"], ["ZZ", "789"]]


The numeric entities can be then converted to numbers:

[["AB", "12"], ["ZZ", "789"]] → [["AB", 12], ["ZZ", 789]]


Then, letters can be converted to their respective numeric representation. For example, if "A" is mapped to 0, "B" - to 1, etc., "AB" is 0 × 26 + 1, while "ZZ" is 25 × 26 + 25.

[["AB", 12], ["ZZ", 789]] → [[26, 12], [675, 789]]


Once you do this conversion, it's pretty simple to know if the value is in a range. For example,

"HC52" → ["HC", "52"]
       → ["HC", 52]
       → [(7 × 26 + 2), 52]
       → [184, 52]


26 ≤ 184 ≤ 675 and 12 ≤ 52 ≤ 789, so the value is in the range.

"HC999" → ["HC", "999"]
        → ["HC", 999]
        → [(7 × 26 + 2), 999]
        → [184, 999]


26 ≤ 184 ≤ 675, but (12 ≤ 999 ≤ 789) is false, so the value is outside of the range.

Extracting useful information from free text
Is there any program or method that allows encryption that can not be brute forced or is it just that any encrypted file can be decrypted by brute force?
