Regular Expressions 101

Community Patterns

Place of Service [POS] Codes


Regular Expression
PCRE2 (PHP >=7.3)


These codes are used to indicate where a medical service was provided in US healthcare (

The codes should be 2 digits. Single digits should have a leading 0. It's possible data loading might drop such values, and then this regex would fail.

This regex will also match codes that are currently unassigned (see link above)

Submitted by Richard Baxter - 2 months ago