ImageGear for C and C++ on Windows v19.9 - Updated
IG_REC_approx_regex_pattern_get
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Approx Regex Functions > IG_REC_approx_regex_pattern_get

Identifies the current text pattern to match.

Declaration:

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

Arguments:

Name Type Description
higRecApproxRegex const HIG_REC_APPROX_REGEX The handle to an approximate regex instance.
pattern_array LPAT_WCHAR** const The far pointer indicating where to return the current vector of text patterns to match. Each pattern is expressed as a UTF-16 string. The caller is responsible for releasing the copy of vector of text patterns returned here using IG_REC_wstring_array_free.
pattern_size AT_INT* const The far pointer indicating where to return the current count of text patterns in the pattern 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.

Example:

 
Copy Code
AT_ERRCOUNT errCount = 0 ;
HIG_REC_APPROX_REGEX higRecApproxRegex = 0 ;
LPAT_WCHAR* pattern_array = 0 ;
AT_INT pattern_size = 0 ;

IG_REC_approx_regex_create( &higRecApproxRegex ) ;
errCount = IG_REC_approx_regex_pattern_get
                          ( higRecApproxRegex, 
                            &pattern_array, 
                            &pattern_size 
                          ) ;
IG_REC_wstring_array_free( pattern_array , pattern_size ) ;
IG_REC_approx_regex_delete( higRecApproxRegex ) ;

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.

The default value is ".+"

The caller is responsible for releasing the array of text patterns returned here using IG_REC_wstring_array_free.

See Also

HIG_REC_APPROX_REGEX

IG_REC_wstring_array_free