Assigns the maximum Substitute count.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_approx_regex_maximum_substitute_count_set( const HIG_REC_APPROX_REGEX higRecApproxRegex, const AT_INT count ); |
Arguments:
higRecApproxRegex | The handle to an approximate regex instance. |
count | The new maximum number of Substitutions allowed for a fuzzy search match. |
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:
Establishes the maximum number of Substitutions allowed for a fuzzy search match. A match is only reported if the total count of Substitutions does not exceed this threshold.
The default value is 1.
With maximum error count and maximum substitute count set to 1, and maximum insert count and maximum delete count set to 0, the following strings match the pattern "12345":
- 12345
- a2345
- 1a345
- 12a45
- 123a5
- 1234a
- 1234 [The ending space is substituted with a 5]
-  2345[The preceding space is substituted with a 1]
- 1234
- 12a345
- 1a2345
Example:
Copy Code | |
---|---|
AT_ERRCOUNT errCount = 0 ; HIG_REC_APPROX_REGEX higRecApproxRegex = 0 ; IG_REC_approx_regex_create( &higRecApproxRegex ) ; errCount = IG_REC_approx_regex_maximum_substitute_count_set ( higRecApproxRegex, 2 ) ; IG_REC_approx_regex_delete( higRecApproxRegex ) ; |