Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
((P\.?O\.?\s*(STAL)?\s*BOX)|(P\.?O\.?\s*(STAL)?\s*)|BOX)(\s*)(#?\s*)(\w*)
"
ig

Description

Parse the box number out of a PO or PO Box or Postal Box or Box

Submitted by anonymous - 7 years ago