Softek Software Barcode Reading Toolkits
HOME PRODUCTS DEVELOPERS STORE ABOUT US
Developer Home
Downloads
Sample Code
Support

Help -> Properties -> Pattern

The Softek Barcode Reader SDK extracts barcode information from images and bitmaps.

Pattern 

Overview

The Pattern property is a regular expression that each barcode found in an image is compared against. The toolkit will only return barcodes that match the pattern.

The toolkit use POSIX extended regular expression syntax.

Examples:

  • "ABCDEF" will match all barcodes containing "ABCDEF" (e.g "XYZABCDEFXYZ") .
  • "ABC[0-9]+" will match all barcodes containing "ABC" followed by one or more digits (e.g XYZABC71827XYZ").
  • "^ABC[0-9]+$" will match barcodes that only consist of "ABC" followed by one or more digits (e.g "ABC12345").

Note that if a Code 39 barcode uses a checksum character and the Pattern property is used to specify the entire string (ie. the last character of the pattern is $) then the Code39Checksum property must also be set to True.

Default value =     NULL

Visual Basic using the OCX

[form.]SoftekBarcode.Pattern = value

Visual Basic using the DLL

Private Declare Function stGetPattern Lib "SoftekBarcode" () As String
Private Declare Function stSetPattern Lib "SoftekBarcode" (ByVal newValue As String) As String
stSetPattern (value)
value = stGetPattern ()

Visual Basic using COM

oBar = CreateObject("SoftekATL.Barcode")
.........
oBar.Pattern = value
value = oBar.Pattern

VB.Net using the DLL

Private Declare Function stGetPattern Lib "SoftekBarcode" () As String
Private Declare Function stSetPattern Lib "SoftekBarcode" (ByVal newValue As String) As String
stSetPattern (value)
value = stGetPattern ()

VB.Net using the SoftekBarcode Wrapper Class

Dim barcode As SoftekBarcode
..........
barcode.SetPattern(value)
value = barcode.GetPattern()

VB.Net using the SoftekBarcodeLib Managed Component

Not implemented.

Visual C++ Using the OCX

BSTR GetPattern();
void SetPattern(BSTR value) ;

Visual C++ Using the DLL

LPCSTR __stdcall stGetPattern();
LPCSTR __stdcall stSetPattern(LPCSTR newValue);