Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

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

Description

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

Submitted by anonymous - a year ago (Last modified a year ago)