Regular Expressions 101

Community Patterns

123...7

Community Library Entry

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 - 3 years ago