# Regex Barcode

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-805d92e729883770fb507ec8044adb5c4ad19d42%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

This can be used for industrial barcodes that are not GS1 Barcodes. You can configure the parsing through the Barcode Regex field.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-2153a93d7cb729f3be4b2cd57187dd89e807fb1f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Example

**Basic structure**: A barcode regex typically matches strings of digits with a fixed or variable length. For example, `^\d{12}$` matches exactly 12 digits, which is common for UPC-A barcodes.

**Common barcode patterns**:

* UPC-A: `^\d{12}$` (12 digits)
* UPC-E: `^\d{6}$` (6 digits)
* EAN-13: `^\d{13}$` (13 digits)
* Code 128: `^[\x00-\x7F]{1,}$` (ASCII characters)
