Regular Expressions 101

Library entries

PO Box Address Validation

Vote

2

Regular Expression
pcre

/
(?(?=^P)P((?:(?:ost)?))(?:\.)?(?:\s+)?O(?:ffice)?(?:\.)?(?:\s+)?B(?:ox)?(?:\.)?(?:\s+)?(?:\#)?(?:[a-z0-9]+(?>\d{1,})(?:\w+)?)$|^Box(?:\.)?(?:\s+)?(?:\#)?(?:[a-z0-9]+(?>\d{1,})(?:\w+)?)$)
/
igm

Description

Loading markdown...
Submitted by mrferos - 7 years ago