Name

MatchAttribute

Synopsis

.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 NotInheritable Class MatchAttribute : Inherits Attribute
' Public Constructors
   Public Sub New(ByVal pattern As String) 
' Public Instance Properties
   Public Property Capture As Integer  
   Public Property Group As Integer  
   Public Property IgnoreCase As Boolean  
   Public Property MaxRepeats As Integer  
   Public Property Pattern As String  
End Class

Hierarchy

System.ObjectSystem.Attribute MatchAttribute

Valid On

All

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.