Datamatrix & RegExp

  • 55 Views
  • Last Post 22 March 2022
smueller posted this 03 March 2022

Hi guys,

 

I'm encountering a problem with a customer case. We're running Capture & Store Version 4.21.08. He would like to read Datamatrix barcodes in his documents. When i'm reading the codes with no regular expression defined, it works fine. But his documents contain more than one barcode, so i have to use regexp to filter - no problem, i guessed. But everytime i use RegExp on Datamatrix, the recognition fails and the variable is empty. Even if i use the RegExp .*, which should pass every barcode, it fails.

 

I tried the same with a Datamatrix document created by my own - same problem. Then i created documents with QR Codes and Code128 barcodes - everything works fine, even with RegExp.

 

Did i encounter a bug here?

 

Kind regards,

 

Sven Müller

Order By: Standard | Newest | Votes
smueller posted this 09 March 2022

Any ideas on my case?

smueller posted this 10 March 2022

Well, i figured out a solution by my own. Seems like, as if the barcode module is reading some weird characters at the end of every (!) Datamatrix code. But it's not a normal character but some kind of linefeed signal or something. So the Regex .* doesn't work, because the point doesn't accept command characters as valid.

 

So i inserted the mode modifier (?s) before my RegEx, so that the point also validates command characters and so now it works smile

 

My example barcode looks like this:

 

LS_123456@789101112 (...and some weird characters at the end, scanshare only prints two underscores) and my working RegEx is:

(?s)LS_.*

 

/LS_.*/s for example unfortunately doesn't work with scanshare...

  • Liked by
  • luca.scarpati
luca.scarpati posted this 11 March 2022

Hi Sven,

 

sorry for the delay in the response.

In general the RegExp inside the Scanshare module looks like OCR, Barcode reader, etc., it must be valid for all returned text but in your case if the barcode have some special characters you need to check it inside you RegExp (maybe you could check it with a dataexport or with another application that there was something different at the end of the barocde value).

 

However we are happy that you have found a solution, so it is not a bug cool ... and just for info Scanshare has more engines for reading barcodes you can change it in the Service Menu (click 20times in the bottom left corner on the " 2010 - 2022 - Scanshare Applications B.V."):

and

The Possible value are integer:

  • 1 (ALL)
  • 2 (LD -> Default)
  • 3 (LDN)
  • 4 (GD)
  • 5 (ZX)

...maybe changing the engine could change the output value and also the recognition.

Sorry again for the delay in the reply but it is an open forum, however for specific errors like yours you can also contact your dealer/NOC for first support and if they cannot solve them they will contact us at our support innocent.

 

Best regards,

Luca

smueller posted this 21 March 2022

Thanks for your answer. Where do i have to click exactly? I can't see the image you posted.

luca.scarpati posted this 22 March 2022

Hi Sven,

 

you're welcome and sorry your are right, for some reason the images were not found. 

Please check it out now in my previous post, thanks laughing

 

Best regards,

Luca

 

Close