Field Scripting Help

  • Last Post 25 September 2017
  • Topic Is Solved
sb6429 posted this 29 August 2017

Looking for an example script that will be deployed at the field level.  The script should replace substrings.  An example is the following:

ABBYY recognizes the order field on the form, right now it is recognizing the string to be S0l22334 when it should be recognizing SO122334.  There are a few more cases where it is recognizing letters as numbers (and vice versa) as well.  Really need some help with this one, thanks in advance! 

Order By: Standard | Newest | Votes
Ekaterina posted this 31 August 2017


To increase the quality of recognition you may use customized data type (field properties > Data tab > “Code” datatype > “Edit” button > “Special” Content setting > “New” button). Choose letters and digits from alphabet or use regular expression. Using the script is not necessary.

Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Types of scripts > Autocorrection script

  • Liked by
  • sb6429
sb6429 posted this 19 September 2017

Okay, so lets say I need the first two characters to always be recognized as letters (small or capital) and the rest of the characters to always be recognized as digits.  Do you have an example of what that regular expression would look like?  Everything I have tried so far stops my documents from being recognized at all.

Ekaterina posted this 20 September 2017


You may find the samples of regular expressions here: “Alphabet used in regular expressions” article in the Developer Help of the ABBYY FlexiCapture.

Could you please send us the sample image that demonstrated the issue and expression that you have tried to use if the problem with recognition still persist?

sb6429 posted this 20 September 2017

Thank you for your help with this, this is our first project using ABBYY, and we are sooo close.

I took some tutorials on regex and have gotten to a point where everything is recognized as it should be, ie. order #s that were recognized as starting S0l are now recognized as starting SO1.  The issue that I am facing now is that even though the regex is working, the document is still being sent to verification station due to a lack of confidence that the Os are really Os, even though the regex is telling ABBYY they are indeed Os. The regex I used for the field is: [A-Za-z][A-Za-z][0-9]{1-}

Attaching the document.

How can we stop this behavior?

Attached Files

Ekaterina posted this 25 September 2017


You may use "[A-Za-z][Oo][0-9]{1-}" expression.