Regular Expression | Regex For Icd9 Codes
I am using Python to extract ICD9 codes. And am using the below regular expression icdRegex = recomp('V\d{2}\.\d{1,2}|\d{3}\.\d{1,2}|E\d{3}\.\d') It captures pattern similar to 13
Solution 1:
Add a negative lookahead assertion like the follwing:
(V\d{2}\.\d{1,2}|\d{3}\.\d{1,2}|E\d{3}\.\d)\b(?!\s?(?:lb|kg)s?)
Post a Comment for "Regular Expression | Regex For Icd9 Codes"