WebSocketMessage ExtractRegExp Method (ExtractionCursor, String)C# API
Extracts multiple string objects from the message 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.7.98 (1.0.0.0)
Syntax

public 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.
ExtractionCursor cursor = new ExtractionCursor();

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

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