Find regular expression matches

Web Site  Methods

 
Regexp::Match
 
BOOL Match(const STRCHAR *str, RegexpMatch* dest,
           const STRCHAR **end_at= NULL)
Requires regular expression support to be enabled by defining STR_USE_REGEX 

This method searches for the regular expression previously set by Parse in the provided string str. Match can be called many times with a single pre-parsed regular expression.

If a non-null value is provided for the end_at parameter, Match will use it to store the address of the first character after a successful matching substring. This allows the caller to find multiple matches by restarting the search at this point in a loop.

The dest parameter identifies an instance of RegexpMatch that will receive the results from the regular expression search.

If FALSE is returned by the method, a match was not found. Otherwise, the call to Match is typically followed by calls to dest->GetCompleteMatch and/or dest->GetMatch to retrieve the matching substring (or groups within it).

 

See also: Regular expression classes, Regular expressions overview