Using negative lookahead in parsley.js-Collection of common programming errors

I am attempting to not allow PO Box addresses to be entered into my address field using parsley.js regex, but so far have been unsuccessful. I could not find anything in documentation saying whether negative lookaheads are allowed or not.


Right now I am receiving and error when the change function runs that is:

Uncaught SyntaxError: Invalid regular expression: /~^(?i)(?!p\.?o\.?\sbox|post\soffice).*$/: Invalid group

Any help would be greatly appreciated!

Originally posted 2013-11-13 09:50:33.