Regex and barcode scanner help

A couple of things you could do.

  1. Most scanners can add a suffix to the barcode without it actually being apart of the barcode like a tab, line feed, carriage return, or any other character. Just program the scanner to add a suffix of your choice

  2. If you do use regex, it would be something like this

(3100[0-9]{28})$

The barcode must start with 3100, then must have 28 digits matching 0-9.

Note: I found that regex with the barcode scanner component to be flawed.
Perspective Barcode Scanner Input: Bad Idea to use Regex on a Numeric Code? - Ignition - Inductive Automation Forum

4 Likes