Looking to validate PO Box but wanted to know if such validation existed. I have the Address field split into Address 1 and Address 2 (Where such PO, Apt, Suite info would go)>
This one works better, as it removes the unneeded groups in the match set and just returns the whole match.
Skips Post 123:
/^\s*((?:P(?:OST)?.?\s*(?:O(?:FF(?:ICE)?)?)?.?\s*(?:B(?:IN|OX)?)+)+|(?:B(?:IN|OX)+\s+)+)\s*\d+/i
Doesn't Skip Post 123:
/^\s*((?:P(?:OST)?.?\s*(?:O(?:FF(?:ICE)?)?)?.?\s*(?:B(?:IN|OX)?)?)+|(?:B(?:IN|OX)+\s+)+)\s*\d+/i
Remove the \d+ at the end to skip the number requirement.