I'm using Laravel regex validation
on the address field provided by users.
I found multiple posts that help to validate address string to be a valid PO Box like here or here, but I need to do the opposite and make sure the provided string is not a PO Box.
PS I don't need to do any address validation, just wanna make sure its anything but a PO Box.
I found this rule pretty useful since it checks for po box number to be present
/^\s*(.*((p|post)[-.\s]*(o|off|office)[-.\s]*(b|box|bin)[-.\s]*)|.*((p|post)[-.\s]*(o|off|office)[-.\s]*)|.*((p|post)[-.\s]*(b|box|bin)[-.\s]*)|(box|bin)[-.\s]*)(#|n|num|number)?\s*\d+/i
Can someone help me to create opposite expression for this one or anything similar?
I suspect I have to use negative lookahead ?!