remove unwanted whitespace

  • 133 Views
  • Last Post 05 February 2021
Mikael Sjödin posted this 05 February 2021

Hi, I have a problem when scanning a page that have a id number for cars and extracting it with ZoneOCR. The numbers have some distance between them so it get read as a space (see attached image, it reads TLN9 87). 

How can a clean the ocr string so the spaces gets removed. Do I need to use a script?

Thanks

/Micke

Attached Files

luca.scarpati posted this 05 February 2021

Hi Micke,

 

if the whitespace is fixed then you can use this tip: 

  • %MYVARIABLE(' ',1)% = TLN9
  • %MYVARIABLE(' ',2)% = 87
  • %MYVARIABLE(' ',1)%%MYVARIABLE(' ',2)% = TLN987

If you cannot predict whitespace (ie whitespace is not fixed most common) then you need a simple VBS or JS script that reads the specific variable and with a simple "Replace" you remove your whitespace.

 

Just for info into our Samples & Materials category, we have an example of "replace" which I think may be useful to you.

 

Have a nice day cool!

 

Best regards,

Luca

 

Close