Regular Expressions 101

Community Patterns

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

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 - 6 months ago (Last modified 6 months ago)