Regular Expressions 101

Community Patterns

1...45678...16

Names from Wikipedia List

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 - a year ago