Regular Expressions 101

Community Patterns

123...6

Community Library Entry

0

Regular Expression
.NET 7.0 (C#)

@"
^(([[a-zA-Z\p{L}\.\-']{1,30})(\s))(([a-zA-Z\p{L}\.\-']{1,30})(\s))?([[a-zA-Z\p{L}\.\-']{1,30})(\s)?(\([a-zA-Z\p{L}\.\-'\s]{1,50}\))?$
"
gm

Description

Matches all names in a Wikipedia List, excluding names with suffixes (eg. Jr., III, PhD, etc.) or multiple middle names.

Submitted by Brian Kozub - 2 years ago