Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^(?<houseNumber>[1-9\p{L}][\d\p{L}]*(?:(?: | ?[\-/+,] ?)[\d\p{L}]+)*?),? (?<street>(?!\d+ )[\p{L}\d'\u2018-\u2019]+\.?(?:[ -][\p{L}\d'\u2018-\u2019]+\.?)*(?<! \d+))$
/
umg

Description

Validate and split street address (street and house number) with leading house number

Submitted by anonymous - a year ago