Barcode scanner

I have a couple of questions about barcode scanner component:

1 - What is the proper/correct entry for regex? Is the an example of it’s usage?

2 - An new array index is added on every scan, what is the max size limit of the array and what happen when it goes over the max?

The regex is any regex - you decide what it ‘should’ be. Regular expressions are a common text-parsing scheme, allowing you to use a very terse syntax to explain conditions that would be complicated to ‘write out’ in actual code. For use in the barcode scanner component, you might want to, for instance, restrict your scanned input to match the format of your product codes, such as ‘3 digits, followed by a hyphen, followed by 5-8 alpha characters’. In regex, that’s ^\d{3}-[a-zA-Z]{5,8}$: regex101: build, test, and debug regex
Your actual regex will vary depending on your requirements.

There is no explicit max size limit. You’re in charge of truncating it, but it shouldn’t be an issue unless you got into the thousands of scanned barcodes without changing pages.

Thank You

Maybe this is a silly question, but does the Barcode Scanner Input component require prefix and suffix in order to have values parsed through Regex? When we attempt to leave prefix and suffix blank and use the window length and regex expression to parse values, it does not log anything. We have verified with the tool above that the regex expression is valid. We don’t have any control over adding a prefix to the scans coming in from the customer

prefix and suffix and regex are mutually exclusive i.e if you use prefix and suffix then regex won’t be used if you leave those values empty then the given regex will be used.

If you want you can include the required prefix and suffix as part of the regex expression if you have one. If there is a predictable pattern or format it seems it is better to use the regex so need to configure a prefix/suffix

Moreover, the format of the regex is not documented and format is that it needs to be surrounded by brackets and group number 1. i.e Format should be (regex){1}