Response ExtractList Method (String, String, Boolean, Int32)C# API
Extracts a list of items from this Response, specifying whether the search should be case-sensitive, and the maximum number of items to extract.

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

public virtual List<string> ExtractList(
	string before,
	string after,
	bool caseSensitive,
	int maxItems


Type: System String
A string before an item to be extracted.
Type: System String
A string after an item to be extracted.
Type: System Boolean
true if the search should be case-sensitive.
Type: System Int32
The maximum number of items to extract.

Return Value

A list containing the extracted string objects.

A search is made for multiple occurrences of the before and after markers. The text between each occurrence of the markers is extracted and appended to the list.

The following example demonstrates extracting multiple strings from a HTML Response.
// The response contains the following text within its body 
// <select> 
//   <option value="volvo">Volvo</option> 
//   <option value="saab">Saab</option> 
//   <option value="mercedes">Mercedes</option> 
//   <option value="audi">Audi</option> 
// </select> 

// Searching from the beginning of the web page extract at most 10 car model items
List<string> matchedstrings = response.ExtractList("<option value=\"", "\">", true, 10);
// contents of matchedstrings = ( volvo, saab, mercedes, audi )
See Also