.NET allows you to create screen-scraping web services that search
the HTML content on a web page by using a regular expression. To
create a pattern matching web service, you need to create a WSDL
document with <match> elements. These match
elements specify the regular expression to use when parsing the
contents of the page and how many matches should be returned. When
the client builds the proxy class for a pattern-matching web service,
it will include a MatchAttribute that describes the match elements
you added to the WSDL document.
The Pattern property specfies the regular
expression pattern to use when searching the web page.
IgnoreCase specifies whether the regular
expression should be run in case-sensitive mode (the default).
MaxRepeats specifies the maximum number of matches
that will be returned (-1, the default, indicates all). Finally,
Group specifies a grouping of related matches,
while Capture specifies the index of a match
within a group.
public sealed class MatchAttribute : Attribute {
// Public Constructors
public MatchAttribute(string pattern);
// Public Instance Properties
public int Capture{set; get; }
public int Group{set; get; }
public bool IgnoreCase{set; get; }
public int MaxRepeats{set; get; }
public string Pattern{set; get; }
}