MatchAttribute.Capture プロパティ
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文
Dim instance As MatchAttribute Dim value As Integer value = instance.Capture instance.Capture = value
グループ内の一致のインデックスを表す値。
Public Class Headers <MatchAttribute("TITLE>(.*?)<")> _ Public Title As String <MatchAttribute("", Pattern:="h1>(.*?)<", IgnoreCase:=True)> _ Public H1 As String <MatchAttribute("H2>((([^<,]*),?)+)<", Group:=3, Capture:=4)> _ Public Element As String <MatchAttribute("H2>((([^<,]*),?){2,})<", Group:=3, MaxRepeats:=0)> _ Public Elements1() As String <MatchAttribute("H2>((([^<,]*),?){2,})<", Group:=3, MaxRepeats:=1)> _ Public Elements2() As String <MatchAttribute("H3 ([^=]*)=([^>]*)", Group:=1)> _ Public Attribute As String <MatchAttribute("H3 ([^=]*)=([^>]*)", Group:=2)> _ Public Value As String End Class 'Headers
public class Example_Headers { [MatchAttribute("TITLE>(.*?)<")] public string Title; [MatchAttribute("", Pattern="h1>(.*?)<", IgnoreCase=true)] public string H1; [MatchAttribute("H2>((([^<,]*),?)+)<", Group=3, Capture=4)] public string Element; [MatchAttribute("H2>((([^<,]*),?){2,})<", Group=3, MaxRepeats=0)] public string[] Elements1; [MatchAttribute("H2>((([^<,]*),?){2,})<", Group=3, MaxRepeats=1)] public string[] Elements2; [MatchAttribute("H3 ([^=]*)=([^>]*)", Group=1)] public string Attribute; [MatchAttribute("H3 ([^=]*)=([^>]*)", Group=2)] public string Value; }
public ref class Example_Headers { public: [MatchAttribute("TITLE>(.*?)<")] String^ Title; [MatchAttribute("",Pattern="h1>(.*?)<",IgnoreCase=true)] String^ H1; [MatchAttribute("H2>((([^<,]*),?)+)<",Group=3,Capture=4)] String^ Element; [MatchAttribute("H2>((([^<,]*),?){2,})<",Group=3,MaxRepeats=0)] array<String^>^ Elements1; [MatchAttribute("H2>((([^<,]*),?){2,})<",Group=3,MaxRepeats=1)] array<String^>^ Elements2; [MatchAttribute("H3 ([^=]*)=([^>]*)",Group=1)] String^ Attribute; [MatchAttribute("H3 ([^=]*)=([^>]*)",Group=2)] String^ Value; };
public class Example_Headers { /** @attribute MatchAttribute("TITLE>(.*?)<") */ public String title; /** @attribute MatchAttribute("", Pattern = "h1>(.*?)<", IgnoreCase = true) */ public String h1; /** @attribute MatchAttribute("H2>((([^<,]*),?)+)<", Group = 3, Capture = 4) */ public String element; /** @attribute MatchAttribute("H2>((([^<,]*),?){2,})<", Group = 3, MaxRepeats = 0) */ public String elements1[]; /** @attribute MatchAttribute("H2>((([^<,]*),?){2,})<", Group = 3, MaxRepeats = 1) */ public String elements2[]; /** @attribute MatchAttribute("H3 ([^=]*)=([^>]*)", Group = 1) */ public String attribute; /** @attribute MatchAttribute("H3 ([^=]*)=([^>]*)", Group = 2) */ public String value; } //Example_Headers
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- MatchAttribute.Capture プロパティのページへのリンク