{"id":15224,"date":"2018-04-27T05:25:42","date_gmt":"2018-04-27T12:25:42","guid":{"rendered":"https:\/\/ephesoft.com\/docs\/?p=15224"},"modified":"2020-08-26T15:58:19","modified_gmt":"2020-08-26T22:58:19","slug":"kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width","status":"publish","type":"post","link":"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/","title":{"rendered":"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width"},"content":{"rendered":"

Applies to:<\/strong>
\nRegex<\/p>\n

Issue:<\/strong><\/p>\n

There can be scenarios where the regex you test in any online site (example: https:..regex101.com) may give error and the same gets processed without any issue in Ephesoft internal regex builder or vice versa.<\/p>\n

For Example below regex in online sites gives\u00a0pattern error<\/b>\u00a0and claims the quantifier\u00a0?<\/b>\u00a0(A quantifier inside a lookbehind makes it non-fixed width)<\/p>\n

(?i)(?<!last\\s?)inv(oice)?\\s?(number|nr|no\\.?)|doc(?!ument\\s?date|umentation)|document(?!\\s?date|ation)<\/p>\n

 <\/p>\n

Root Cause & Solution:<\/strong><\/p>\n

Different online regex platforms use different regex engines which may or may not process the regex depending upon its syntax check. A regex should always be selected by testing it on any java based online platform and then by testing the regex expression in Ephesoft as well to make sure that regex is valid.<\/p>\n

In above case\u00a0The pattern gives you an error because of the regex engine itself. Some of the regex engines use strict language expression. The regex expression mentioned above\u00a0 works without any issues in a javascript based regex engine.<\/span><\/p>\n

Reference article:<\/strong>
\nhttps:\/\/stackoverflow.com\/questions\/9030305\/regular-expression-lookbehind-doesnt-work-with-quantifiers-or\/11681936<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

Applies to: Regex Issue: There can be scenarios where the regex you test in any online site (example: https:..regex101.com) may […]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12388],"tags":[1430,1306],"yoast_head":"\nKB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width | Ephesoft Docs<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width\" \/>\n<meta property=\"og:description\" content=\"Applies to: Regex Issue: There can be scenarios where the regex you test in any online site (example: https:..regex101.com) may […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/\" \/>\n<meta property=\"og:site_name\" content=\"Ephesoft Docs\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-27T12:25:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-26T22:58:19+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/\",\"url\":\"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/\",\"name\":\"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width | Ephesoft Docs\",\"isPartOf\":{\"@id\":\"https:\/\/ephesoft.com\/docs\/#website\"},\"datePublished\":\"2018-04-27T12:25:42+00:00\",\"dateModified\":\"2020-08-26T22:58:19+00:00\",\"author\":{\"@id\":\"\"},\"breadcrumb\":{\"@id\":\"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ephesoft.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ephesoft.com\/docs\/#website\",\"url\":\"https:\/\/ephesoft.com\/docs\/\",\"name\":\"Ephesoft Docs\",\"description\":\"Intelligent Document Processing Made Easy\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ephesoft.com\/docs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width | Ephesoft Docs","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width","og_description":"Applies to: Regex Issue: There can be scenarios where the regex you test in any online site (example: https:..regex101.com) may […]","og_url":"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/","og_site_name":"Ephesoft Docs","article_published_time":"2018-04-27T12:25:42+00:00","article_modified_time":"2020-08-26T22:58:19+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/","url":"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/","name":"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width | Ephesoft Docs","isPartOf":{"@id":"https:\/\/ephesoft.com\/docs\/#website"},"datePublished":"2018-04-27T12:25:42+00:00","dateModified":"2020-08-26T22:58:19+00:00","author":{"@id":""},"breadcrumb":{"@id":"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ephesoft.com\/docs\/kb00021928-regex-error-a-quantifier-inside-a-lookbehind-makes-it-non-fixed-width\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ephesoft.com\/docs\/"},{"@type":"ListItem","position":2,"name":"KB00021928 : Regex Error : A quantifier inside a lookbehind makes it non-fixed width"}]},{"@type":"WebSite","@id":"https:\/\/ephesoft.com\/docs\/#website","url":"https:\/\/ephesoft.com\/docs\/","name":"Ephesoft Docs","description":"Intelligent Document Processing Made Easy","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ephesoft.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":""}]}},"_links":{"self":[{"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/posts\/15224"}],"collection":[{"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/comments?post=15224"}],"version-history":[{"count":0,"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/posts\/15224\/revisions"}],"wp:attachment":[{"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/media?parent=15224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/categories?post=15224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ephesoft.com\/docs\/wp-json\/wp\/v2\/tags?post=15224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}