Thanks so much.
The prefixes could be be pn, 1icc, 2icc, pnp, P/p, H/h in their entirety. I just found a random example in the variable.
The digits after the prefix are usually 3 digits but could vary like:
pn1052
p270 H124 / pnp270h124 (the two variations someone could enter the same code)
The further issue is that since this is hand typed by people, some might accidentally mistype 1icc as 1ic, or icc.
The full list of the codes are available in the exact format they should be in and I can create a reference dataset. I like your suggestion of using the list to generate some code to convert the string.
For now, I've been trying to find all of the mistyped combinations and 'correct' them.