Response ExtractRegExp Method (ExtractionCursor, String)C# API
Extracts multiple string objects from the response content, wherever the specified regular expression matches.

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

public virtual RegExpMatchList ExtractRegExp(
	ExtractionCursor cursor,
	string regExp
)

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.

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.

Note Note
The search is case-sensitive.

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,
                        "<!--.*?-->");

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