Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?<streetname>\d*[\p{L}\d '\/.\-]+)[,\s]+(?<housenumber>\d+)\s*(?<ext>[\p{L}\d\-\/'"() ]*)$
/
iu

Description

Validates a streetname + housenr + extension

Somestreet 12 b

Submitted by anonymous - 4 years ago (Last modified 5 months ago)