<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Advanced Regular Expressions in C#</title>
	<atom:link href="http://www.dijksterhuis.org/regular-expressions-advanced/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dijksterhuis.org/regular-expressions-advanced/</link>
	<description>Information, news about programming in C#</description>
	<lastBuildDate>Sun, 21 Feb 2010 16:48:33 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Holystream</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-1446</link>
		<dc:creator>Holystream</dc:creator>
		<pubDate>Fri, 02 Oct 2009 17:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-1446</guid>
		<description>Just noticed Richard said the same thing :)</description>
		<content:encoded><![CDATA[<p>Just noticed Richard said the same thing <img src='http://www.dijksterhuis.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Holystream</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-1444</link>
		<dc:creator>Holystream</dc:creator>
		<pubDate>Fri, 02 Oct 2009 16:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-1444</guid>
		<description>Because we have added a lot of spaces and new lines to our expression we need to tell Regex about them by specifying the RegexOptions.Multiline and RegexOptions.IgnorePatternWhitespace options.

This is incorrect.  RegexOptions.Multiline changes the behavior of the matching against the target string.  It does not have anything to do with breaking the regular expression into multiple lines.  For example, if your option is RegexOptions.Singleline, then ^ matches the start of the entire string, $ matches the end of the entire string, while in RegexOptions.Multiline, ^ matches start of the beginning of the line after the last carriage return, and $ matches before the carriage return.

All you need is RegexOptions.IgnorePatternWhitespace, if you broke your regular expression into multiple lines.</description>
		<content:encoded><![CDATA[<p>Because we have added a lot of spaces and new lines to our expression we need to tell Regex about them by specifying the RegexOptions.Multiline and RegexOptions.IgnorePatternWhitespace options.</p>
<p>This is incorrect.  RegexOptions.Multiline changes the behavior of the matching against the target string.  It does not have anything to do with breaking the regular expression into multiple lines.  For example, if your option is RegexOptions.Singleline, then ^ matches the start of the entire string, $ matches the end of the entire string, while in RegexOptions.Multiline, ^ matches start of the beginning of the line after the last carriage return, and $ matches before the carriage return.</p>
<p>All you need is RegexOptions.IgnorePatternWhitespace, if you broke your regular expression into multiple lines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul heintz</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-1235</link>
		<dc:creator>paul heintz</dc:creator>
		<pubDate>Thu, 27 Aug 2009 11:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-1235</guid>
		<description>Excellent, I&#039;ve used them for years and yes after coming back to my code to modify many a time have I crossed my eyes trying to remember why and what I did.

This is extremely helpful at structuring code

Thank you,</description>
		<content:encoded><![CDATA[<p>Excellent, I&#8217;ve used them for years and yes after coming back to my code to modify many a time have I crossed my eyes trying to remember why and what I did.</p>
<p>This is extremely helpful at structuring code</p>
<p>Thank you,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Sykora</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-1004</link>
		<dc:creator>Martin Sykora</dc:creator>
		<pubDate>Mon, 15 Jun 2009 17:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-1004</guid>
		<description>Wow, this is a sweet little intro to regex, good blog writing my friend! 

Keep it up!! I am looking forward to other topics you will cover ;-)</description>
		<content:encoded><![CDATA[<p>Wow, this is a sweet little intro to regex, good blog writing my friend! </p>
<p>Keep it up!! I am looking forward to other topics you will cover <img src='http://www.dijksterhuis.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Link Love &#124; Kaeli's Space</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-724</link>
		<dc:creator>Link Love &#124; Kaeli's Space</dc:creator>
		<pubDate>Sun, 12 Apr 2009 13:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-724</guid>
		<description>[...] Advanced Regular Expressions in C# - neat tricks, including how to comment the expression [...]</description>
		<content:encoded><![CDATA[<p>[...] Advanced Regular Expressions in C# &#8211; neat tricks, including how to comment the expression [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-447</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Fri, 13 Mar 2009 17:34:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-447</guid>
		<description>&quot;Because we have added a lot of spaces and new lines to our expression we need to tell Regex about them by specifying the RegexOptions.Multiline and RegexOptions.IgnorePatternWhitespace options.&quot;

RegexOptions.Multiline doesn&#039;t do what you think it does. Rather than specifying that the pattern is on multiple lines, it changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.

RegexOptions.IgnorePatternWhitespace is enough to tell the engine to ignore the white-space - including new-lines - within your pattern.</description>
		<content:encoded><![CDATA[<p>&#8220;Because we have added a lot of spaces and new lines to our expression we need to tell Regex about them by specifying the RegexOptions.Multiline and RegexOptions.IgnorePatternWhitespace options.&#8221;</p>
<p>RegexOptions.Multiline doesn&#8217;t do what you think it does. Rather than specifying that the pattern is on multiple lines, it changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.</p>
<p>RegexOptions.IgnorePatternWhitespace is enough to tell the engine to ignore the white-space &#8211; including new-lines &#8211; within your pattern.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-430</link>
		<dc:creator>Gareth</dc:creator>
		<pubDate>Thu, 12 Mar 2009 14:42:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-430</guid>
		<description>I like to learn something every day. And I never knew you could use &quot;#&quot; to comment regular expressions in conjunction with RegexOptions.IgnorePatternWhitespace. Thanks!</description>
		<content:encoded><![CDATA[<p>I like to learn something every day. And I never knew you could use &#8220;#&#8221; to comment regular expressions in conjunction with RegexOptions.IgnorePatternWhitespace. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martijn</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-427</link>
		<dc:creator>Martijn</dc:creator>
		<pubDate>Thu, 12 Mar 2009 02:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-427</guid>
		<description>Hi George, 

Many thanks for the feedback!  You are not missing things -- I was so focused on using index entries that I forgot to check if a name would work as well. I will fix the example as this makes things that much cleaner. 

Cheers,
Martijn</description>
		<content:encoded><![CDATA[<p>Hi George, </p>
<p>Many thanks for the feedback!  You are not missing things &#8212; I was so focused on using index entries that I forgot to check if a name would work as well. I will fix the example as this makes things that much cleaner. </p>
<p>Cheers,<br />
Martijn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: georg</title>
		<link>http://www.dijksterhuis.org/regular-expressions-advanced/comment-page-1/#comment-425</link>
		<dc:creator>georg</dc:creator>
		<pubDate>Wed, 11 Mar 2009 21:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=846#comment-425</guid>
		<description>Nice series! Clean and easy to follow - even if I&#039;ve used regular expressions for some time now, there&#039;s always something new to pick up. One question though: At line 36 in the fourth listing you say &quot;// The only drawback to named groups is that we need to look up their
       // index offset in the group table.&quot;

And then you use the index when fetching the named group values. Isn&#039;t it the same thing to use the name of the group directly or am I missing something here, e.g: 

your line(#28): return match.Groups[of_Username].Value
could be: return match.Groups[&quot;Username&quot;].Value 

or.....?

regards,
George</description>
		<content:encoded><![CDATA[<p>Nice series! Clean and easy to follow &#8211; even if I&#8217;ve used regular expressions for some time now, there&#8217;s always something new to pick up. One question though: At line 36 in the fourth listing you say &#8220;// The only drawback to named groups is that we need to look up their<br />
       // index offset in the group table.&#8221;</p>
<p>And then you use the index when fetching the named group values. Isn&#8217;t it the same thing to use the name of the group directly or am I missing something here, e.g: </p>
<p>your line(#28): return match.Groups[of_Username].Value<br />
could be: return match.Groups["Username"].Value </p>
<p>or&#8230;..?</p>
<p>regards,<br />
George</p>
]]></content:encoded>
	</item>
</channel>
</rss>
