\b[0-9BCDFGHX][0-9A-HJ-NP-Z]{6}\b
False positives exist! E.g. “G0BBLDGˮ would be identified as an ICD10 PCS code with the expression even though it isnʼt one.
But no false negatives (tested against all 2023 CMS-approved codes):
In [13]: import re
In [14]: with open("icd10pcs_codes_2023.txt") as pcs: