<< back to sysax.com Product page

14.2. Regular Expression Matching

The IsRegexMatch method can be used to check name matching using regular expressions. The "i" option can be specified to perform case insensitive matching.

Exhibit 14.3. IDL Definition of method to regular expression matching


HRESULT IsRegexMatch ([in] BSTR b_name, [in] BSTR b_pattern, [in, defaultvalue("")] BSTR b_options, [out, retval, defaultvalue(NULL)] VARIANT_BOOL *f_is_match);


Exhibit 14.4. Example usage of method to regular expression matching (VBScript)


If IsRegexMatch("file.txt", "[a-z]+", "i") Then
  'there is a match
End If