Regular Expressions 101

Community Patterns

Community Library Entry

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 - 6 months ago (Last modified 6 months ago)