Regular Expressions 101

Community Patterns

1...34567...17

NDC

0

Regular Expression
.NET 7.0 (C#)

@"
^(?:\d{4}-\d{4}-\d{2}|\d{5}-(?:\d{3}-\d{2}|\d{4}-\d{1,2})|\d{11}|\d{10}|\d{9})$
"
gm

Description

parses all valid NDC codes with or without hyphens

Submitted by joe.cox@fortyau.com - 2 years ago