Regular Expressions 101

Community Patterns

ICD-10-CM (Clinical Modification) Codes

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^[a-zA-Z]\d[a-zA-Z\d]\.?([a-zA-Z\d]{0,4})?$
/
gm

Description

The regex should match ICD-10-CM codes, including those with the optional up to 4 characters suffix used in some codes.

NOTE: This regex assumes the letters can be mixed case.

Submitted by Richard Baxter - 2 months ago (Last modified a month ago)