ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_approx_regex_pattern_set
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Approx Regex Functions > IG_REC_approx_regex_pattern_set

Glossary Item Box

Assigns one or more text patterns to match.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_approx_regex_pattern_set(
   const HIG_REC_APPROX_REGEX higRecApproxRegex,
   LPAT_WCHAR *const  pattern_array,
   const AT_INT pattern_size
);

Arguments:

higRecApproxRegex The handle to an approximate regex instance.
pattern_array A vector of text patterns to match. Each pattern must be expressed as a UTF-16 string. The caller may free this data after this function returns.
pattern_size The count of text patterns in the array.

Return Value:

The number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

The approximate regex supports POSIX 1003.2 Extended Regular Expression (ERE) syntax and the Basic Regular Expression (BRE) syntax. Callers specify patterns that match text to match.

Look-ahead and look-behind are not supported.

Default value is ".+"

Example:

  Copy Code
AT_ERRCOUNT errCount = 0 ;
LPAT_WCHAR patterns [] = { L"the" , L"bart" , L"the" } ;
HIG_REC_APPROX_REGEX higRecApproxRegex = 0 ;

IG_REC_approx_regex_create( &higRecApproxRegex ) ;
errCount = IG_REC_approx_regex_pattern_set
                           ( higRecApproxRegex,
                             patterns,
                             2 
                           ) ;
IG_REC_approx_regex_delete( higRecApproxRegex ) ;

See Also

HIG_REC_APPROX_REGEX

©2012. Accusoft Corporation. All Rights Reserved.