Response ExtractRegExp Method (ExtractionCursor, String, Boolean)C# API
Extracts multiple string objects from the response content, wherever the specified regular expression matches, and specifying whether the search will be case-sensitive.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.5.77 (1.0.0.0)
Syntax

public virtual RegExpMatchList ExtractRegExp(
	ExtractionCursor cursor,
	string regExp,
	bool caseSensitive
)

Parameters

cursor
Type: Facilita.Native ExtractionCursor
An ExtractionCursor object to store the success/failure of the action, and the index in the response at which the match was found.
regExp
Type: System String
The regular expression to match.
caseSensitive
Type: System Boolean
true if the search should be case-sensitive.

Return Value

A RegExpMatchList containing the list of matches.
Remarks

Information about the success/failure of this method will be stored in the ExtractionCursor object passed.
Examples

The following example demonstrates extracting HTML comments from an HTML Response.
Response response = request.Send();
ExtractionCursor cursor = new ExtractionCursor();

// write out the HTML comment lines in the current web page
RegExpMatchList matches = response.ExtractRegExp(
                        cursor,
                        "<!--.*?-->",
                        true);

for (int i = 0; i < matches.Count; i++)
{
    WriteMessage(matches[i].Match);
}
See Also