Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Multiline Address
Open Workspace
PCRE2 (PHP)
Match
Created 2023-08-11 04:05
1
Regular Expression
/
^
(?:
(?P<name>
[
\p{L}
\.\
]
+
)
\n
)?
(?:
(?P<co>
[
\p{L}
\.\
\/
]
+
)
\n
)?
(?P<street>
[
\p{L}
\
\p{N}
’
\.
]
+
)
\n
(?:
(?<city>
[
\p{L}
\
]
+
)
\n
)?
(?P<postal_code>
[
\p{N}
\
]
+
)
\
(?P<postal_city>
[
\p{L}
\
]
+
)(?:
\(
(?<province>
[
\p{L}
\
]
+
)
\)
)?
\n
(?P<country>
[
\p{L}
\
]
+
)?
$
/
gmx
Description
Match multiline address formats
Submitted by
Anonymous