<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FRegular_Expressions%2FGroup_Capture</id>
		<title>Csharp/C Sharp/Regular Expressions/Group Capture - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FRegular_Expressions%2FGroup_Capture"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Regular_Expressions/Group_Capture&amp;action=history"/>
		<updated>2026-04-29T19:52:14Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Regular_Expressions/Group_Capture&amp;diff=1527&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Regular_Expressions/Group_Capture&amp;diff=1527&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Regular_Expressions/Group_Capture&amp;diff=1528&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Regular_Expressions/Group_Capture&amp;diff=1528&amp;oldid=prev"/>
				<updated>2010-05-26T11:47:15Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Illustrates the use of groups and captures==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Mastering Visual C# .NET&lt;br /&gt;
by Jason Price, Mike Gunderloy&lt;br /&gt;
Publisher: Sybex;&lt;br /&gt;
ISBN: 0782129110&lt;br /&gt;
*/&lt;br /&gt;
/*&lt;br /&gt;
  ExampleC_2.cs illustrates the use of groups and captures&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.Text.RegularExpressions;&lt;br /&gt;
public class ExampleC_2&lt;br /&gt;
{&lt;br /&gt;
  public static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    // create a string containing area codes and phone numbers&lt;br /&gt;
    string text =&lt;br /&gt;
      &amp;quot;(800) 555-1211\n&amp;quot; +&lt;br /&gt;
      &amp;quot;(212) 555-1212\n&amp;quot; +&lt;br /&gt;
      &amp;quot;(506) 555-1213\n&amp;quot; +&lt;br /&gt;
      &amp;quot;(650) 555-1214\n&amp;quot; +&lt;br /&gt;
      &amp;quot;(888) 555-1215\n&amp;quot;;&lt;br /&gt;
    // create a string containing a regular expression to&lt;br /&gt;
    // match an area code; this is a group of three numbers within&lt;br /&gt;
    // parentheses, e.g. (800)&lt;br /&gt;
    // this group is named &amp;quot;areaCodeGroup&amp;quot;&lt;br /&gt;
    string areaCodeRegExp = @&amp;quot;(?&amp;lt;areaCodeGroup&amp;gt;\(\d\d\d\))&amp;quot;;&lt;br /&gt;
    // create a string containing a regular expression to&lt;br /&gt;
    // match a phone number; this is a group of seven numbers&lt;br /&gt;
    // with a hyphen after the first three numbers, e.g. 555-1212&lt;br /&gt;
    // this group is named &amp;quot;phoneGroup&amp;quot;&lt;br /&gt;
    string phoneRegExp = @&amp;quot;(?&amp;lt;phoneGroup&amp;gt;\d\d\d\-\d\d\d\d)&amp;quot;;&lt;br /&gt;
    // create a MatchCollection object to store the matches&lt;br /&gt;
    MatchCollection myMatchCollection =&lt;br /&gt;
      Regex.Matches(text, areaCodeRegExp + &amp;quot; &amp;quot; + phoneRegExp);&lt;br /&gt;
    // use a foreach loop to iterate over the Match objects in&lt;br /&gt;
    // the MatchCollection object&lt;br /&gt;
    foreach (Match myMatch in myMatchCollection)&lt;br /&gt;
    {&lt;br /&gt;
      // display the &amp;quot;areaCodeGroup&amp;quot; group match directly&lt;br /&gt;
      Console.WriteLine(&amp;quot;Area code = &amp;quot; + myMatch.Groups[&amp;quot;areaCodeGroup&amp;quot;]);&lt;br /&gt;
      // display the &amp;quot;phoneGroup&amp;quot; group match directly&lt;br /&gt;
      Console.WriteLine(&amp;quot;Phone = &amp;quot; + myMatch.Groups[&amp;quot;phoneGroup&amp;quot;]);&lt;br /&gt;
      // use a foreach loop to iterate over the Group objects in&lt;br /&gt;
      // myMatch.Group&lt;br /&gt;
      foreach (Group myGroup in myMatch.Groups)&lt;br /&gt;
      {&lt;br /&gt;
        // use a foreach loop to iterate over the Capture objects in&lt;br /&gt;
        // myGroup.Captures&lt;br /&gt;
        foreach (Capture myCapture in myGroup.Captures)&lt;br /&gt;
        {&lt;br /&gt;
          Console.WriteLine(&amp;quot;myCapture.Value = &amp;quot; + myCapture.Value);&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>