{"id":1367,"date":"2022-08-30T15:15:56","date_gmt":"2022-08-30T15:15:56","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/13\/using-negative-lookahead-in-parsley-js-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:15:56","modified_gmt":"2022-08-30T15:15:56","slug":"using-negative-lookahead-in-parsley-js-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/using-negative-lookahead-in-parsley-js-collection-of-common-programming-errors\/","title":{"rendered":"Using negative lookahead in parsley.js-Collection of common programming errors"},"content":{"rendered":"<p>I am attempting to not allow PO Box addresses to be entered into my address field using <code>parsley.js<\/code> regex, but so far have been unsuccessful. I could not find anything in documentation saying whether negative lookaheads are allowed or not.<\/p>\n<pre><code>\n<\/code><\/pre>\n<p>Right now I am receiving and error when the change function runs that is:<\/p>\n<pre><code>Uncaught SyntaxError: Invalid regular expression: \/~^(?i)(?!p\\.?o\\.?\\sbox|post\\soffice).*$\/: Invalid group\n<\/code><\/pre>\n<p>Any help would be greatly appreciated!<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-13 09:50:33. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1367","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1367"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1367\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}