Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
\b(po\s+box\s*)(\d+(?:\s+\d+)+)
"
gm
Input 1
New
po box 12 34 5 heisenburg 902 rr 15 po box 12 59 76 po box 56 56 barry 56 87 barry box 56 87
Extraction
po box 12 34 5 heisenburg 902 rr 15 po box 12 59 76 po box 56 56 barry 56 87 barry box 56 87