Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
(?(?=^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

no description available

Submitted by mrferos - 10 years ago