Regular Expressions 101

Community Patterns

PO Box# Parser

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