{"id":24120,"date":"2024-05-20T13:08:48","date_gmt":"2024-05-20T11:08:48","guid":{"rendered":"https:\/\/help.openbee.com\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/auto-regex-generation\/"},"modified":"2026-05-13T09:39:39","modified_gmt":"2026-05-13T07:39:39","slug":"auto-regex-generation","status":"publish","type":"page","link":"https:\/\/help.openbee.com\/en\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/auto-regex-generation\/","title":{"rendered":"Auto-regex generation"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Context<\/h2>\n\n<p>Within Open Bee\u2122 Scan Capture, there is a feature that allows auto-generation of regexes for <strong>string-type indexes.<\/strong> Indeed, this technology requires special knowledge in order to recognize precise values contained in a text, which is why this tool has been made available in our software.<\/p>\n\n<h2 class=\"wp-block-heading\">Usage<\/h2>\n\n<p>In order to use this tool, you must first create a customization area on the index concerned<\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"248\" height=\"133\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2024\/05\/image-3.png\" alt=\"\" class=\"wp-image-22214\"\/><\/figure>\n\n<p>Then by clicking on the configure button  <\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"31\" height=\"30\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2024\/05\/image-4.png\" alt=\"\" class=\"wp-image-22217\"\/><\/figure>\n\n<p>A customization window will open<\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"197\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2024\/05\/image-6.png\" alt=\"\" class=\"wp-image-22223\" srcset=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2024\/05\/image-6.png 546w, https:\/\/help.openbee.com\/wp-content\/uploads\/2024\/05\/image-6-300x108.png 300w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/figure>\n\n<p>In our case, we are only interested in the &#8220;Value&#8221; part. In the text field you will find all the text selected in the customization area, it is up to the user to rectify this text directly in the field in order to obtain the desired final value. <\/p>\n\n<p>On the left of this field, you will find an indicator:<br\/>&#8211; Green check: The value corresponds to a regex, so it is likely to be found by the software<br\/>&#8211; Orange alert (See screenshot above): The value currently does not match any regex in the index, it cannot be found at the moment.<\/p>\n\n<p>In this second case illustrated by the screenshot, you have the option of using the magic wand button on the right of the text field. Pressing this button will generate a regex corresponding to the specified value so that it can be found for our software. <\/p>\n\n<h2 class=\"wp-block-heading\">Result<\/h2>\n\n<p>The result of this generation is a regex corresponding to your value, which is favorited in the list of regexes in your index. The fact that it is favorited tells Capture which one should be studied first. Also, if Capture finds a value that matches a favorite regex, it stops its search without investigating any other possible non-favorite regexes.  <\/p>\n\n<h2 class=\"wp-block-heading\">Limitation<\/h2>\n\n<p>This auto-generation can be very practical in order to recognize unknown values for our software. However, this has some limitations, including the fact that the generated regex strictly matches the value indicated in the text field and therefore does not allow a change in length for the value to be found and that it becomes a priority when searching for values. <\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Let&#8217;s take an example, my invoice number is still in the FT405 form, so using auto generation will create a regex to find: <strong>An uppercase letter, followed by an uppercase letter, followed by a number, followed by a digit<\/strong>. This will be able to meet the case expected by the user. <\/p>\n<\/blockquote>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>If we take another example, my invoice number always starts with FT but can have between 2 and 4 digits in a row. In this specific case, self-generation will not make it possible to find the final value in all cases. Indeed, if at the time of generation the value chosen is <strong>FT405<\/strong>, as indicated above, the generated regex will be an uppercase letter, followed by <strong>an uppercase letter, followed by a number, followed by a digit, followed by a digit<\/strong>, so it will correspond to this value but will not correspond to another possible value such as <strong>FT32 <\/strong>or <strong>FT4986<\/strong>.  <\/p>\n<\/blockquote>\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n<p>This tool is very powerful and allows users of the software to improve the recognition of their document, especially for indexes that often retain the same value structure, without having to know the complexity of the regex language.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Context Within Open Bee\u2122 Scan Capture, there is a feature that allows auto-generation of regexes for string-type indexes. Indeed, this technology requires special knowledge in order to recognize precise values contained in a text, which is why this tool has been made available in our software. Usage In order to use this tool, you must [&hellip;]<\/p>\n","protected":false},"author":97,"featured_media":0,"parent":21191,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-24120","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/24120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/users\/97"}],"replies":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/comments?post=24120"}],"version-history":[{"count":1,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/24120\/revisions"}],"predecessor-version":[{"id":24121,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/24120\/revisions\/24121"}],"up":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21191"}],"wp:attachment":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/media?parent=24120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}