I inherited code from someone else, and I can't understand the middle of the regular expression. I've googled regex cheat sheets online, but none of them touch on what S[KD]|HH|H might mean.
Could someone help me backwards interpret this?
^([0-9][[:upper:]]) ([0-9]{1,3}|S[KD]|HH|H) ?([A-P,R-S]|Q[0-9]|Q)?$
I understand the first section is looking for a single digit and an uppercase letter. I can try and puzzle my way through the last section. But that middle section is a doozy for me.
I would be looking for a translation like "Any number of 1 to 3 digits long, or the character S and then KD together, or two H's, or a single H." (I don't think that's the right interpretation, but that has been my best guess).
Thank you so much in advance. I know these regex questions are common and not fun.