Regular Expressions 101

Community Patterns

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

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 - 6 months ago