<?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: Just Enough Regular Expressions for Cucumber</title>
	<atom:link href="http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/</link>
	<description>On making software teams happier and more productive</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:41:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Rails Testing &#8211; Cucumber &#8211; Regex &#171; DevItYrslf.RoR.jQ</title>
		<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/comment-page-1/#comment-13875</link>
		<dc:creator>Rails Testing &#8211; Cucumber &#8211; Regex &#171; DevItYrslf.RoR.jQ</dc:creator>
		<pubDate>Mon, 26 Dec 2011 16:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardlawrence.info/?p=261#comment-13875</guid>
		<description>[...] Just Enough Regular Expressions for Cucumber — Richard Lawrence — Richard Lawrence. Share this:TwitterFacebookLike this:LikeBe the first to like this post. [...]</description>
		<content:encoded><![CDATA[<p>[...] Just Enough Regular Expressions for Cucumber — Richard Lawrence — Richard Lawrence. Share this:TwitterFacebookLike this:LikeBe the first to like this post. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Lawrence</title>
		<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/comment-page-1/#comment-107</link>
		<dc:creator>Richard Lawrence</dc:creator>
		<pubDate>Wed, 21 Jul 2010 17:31:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardlawrence.info/?p=261#comment-107</guid>
		<description>You&#039;re right, Jon. I think I&#039;ve only used that pattern with Ruby and Java, so I didn&#039;t think about the .NET escape sequence. It definitely reads better with &lt;code&gt;(.*)&lt;/code&gt;, but it&#039;s less precise. Since the &lt;code&gt;*&lt;/code&gt; is greedy, &lt;code&gt;&quot;(.*)&quot;&lt;/code&gt; will jump over double quotes to match a later double quote, which can lead to some surprising matches.</description>
		<content:encoded><![CDATA[<p>You&#8217;re right, Jon. I think I&#8217;ve only used that pattern with Ruby and Java, so I didn&#8217;t think about the .NET escape sequence. It definitely reads better with</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">(.*)</div></td></tr></tbody></table></div>
<p>, but it&#8217;s less precise. Since the</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">*</div></td></tr></tbody></table></div>
<p>is greedy,</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&quot;(.*)&quot;</div></td></tr></tbody></table></div>
<p>will jump over double quotes to match a later double quote, which can lead to some surprising matches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Archer</title>
		<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/comment-page-1/#comment-95</link>
		<dc:creator>Jon Archer</dc:creator>
		<pubDate>Wed, 21 Jul 2010 16:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardlawrence.info/?p=261#comment-95</guid>
		<description>So this may be due to the fact that I&#039;m recovering from a 3 year bout of management and that C# is new to me, but I had a few moments of trouble getting the pattern for capturing quoted text to work, i.e. this one: &quot;[^\&quot;]*&quot;

It seems it was all down to the fact that when using the @&quot;...&quot; form in C# to declare the string pattern one escapes inline quotes by double quoting not using the \&quot;

This worked for me:
&lt;code&gt;
        [When(@&quot;^.*username &quot;&quot;([^&quot;&quot;]*)&quot;&quot;.*password &quot;&quot;([^&quot;&quot;]*)&quot;&quot;.*$&quot;)]
        public void Login(string username, string password)
        {
            user = securityFactility.Authenticate(username, password);
        }
&lt;code&gt;
Although I think I prefer &lt;code&gt;[When(@&quot;^.*username &quot;&quot;(.*)&quot;&quot;.*password &quot;&quot;(.*)&quot;&quot;.*$&quot;)]&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>So this may be due to the fact that I&#8217;m recovering from a 3 year bout of management and that C# is new to me, but I had a few moments of trouble getting the pattern for capturing quoted text to work, i.e. this one: &#8220;[^\"]*&#8221;</p>
<p>It seems it was all down to the fact that when using the @&#8221;&#8230;&#8221; form in C# to declare the string pattern one escapes inline quotes by double quoting not using the \&#8221;</p>
<p>This worked for me:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; [When(@&quot;^.*username &quot;&quot;([^&quot;&quot;]*)&quot;&quot;.*password &quot;&quot;([^&quot;&quot;]*)&quot;&quot;.*$&quot;)]<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void Login(string username, string password)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user = securityFactility.Authenticate(username, password);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&lt;code&gt;<br />
Although I think I prefer &lt;code&gt;[When(@&quot;^.*username &quot;&quot;(.*)&quot;&quot;.*password &quot;&quot;(.*)&quot;&quot;.*$&quot;)]</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abder-Rahman</title>
		<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/comment-page-1/#comment-90</link>
		<dc:creator>Abder-Rahman</dc:creator>
		<pubDate>Wed, 21 Jul 2010 15:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardlawrence.info/?p=261#comment-90</guid>
		<description>Thanks a lot for this excellent article. What was missing for me especially when coming to regular expressions.

Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this excellent article. What was missing for me especially when coming to regular expressions.</p>
<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Lawrence</title>
		<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/comment-page-1/#comment-73</link>
		<dc:creator>Richard Lawrence</dc:creator>
		<pubDate>Wed, 21 Jul 2010 00:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardlawrence.info/?p=261#comment-73</guid>
		<description>Good catch. I&#039;ll update the post.</description>
		<content:encoded><![CDATA[<p>Good catch. I&#8217;ll update the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Archer</title>
		<link>http://www.richardlawrence.info/2010/07/20/just-enough-regular-expressions-for-cucumber/comment-page-1/#comment-72</link>
		<dc:creator>Jon Archer</dc:creator>
		<pubDate>Wed, 21 Jul 2010 00:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardlawrence.info/?p=261#comment-72</guid>
		<description>This is just the kind of info I needed: a simple cheat sheet of techniques for the commonest things I think I&#039;m going to need to do w/Cuke4Nuke.  I&#039;m very glad you wrote it up. Thanks also for the link to my post :-)

One thing I did notice here that I want to ask about. After explaining the anchors and their use, I note that you didn&#039;t actually have them in place on your examples in the captures section. Now is that just accidental, or is there a cunning rationale to that which I&#039;m missing?</description>
		<content:encoded><![CDATA[<p>This is just the kind of info I needed: a simple cheat sheet of techniques for the commonest things I think I&#8217;m going to need to do w/Cuke4Nuke.  I&#8217;m very glad you wrote it up. Thanks also for the link to my post <img src='http://www.richardlawrence.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>One thing I did notice here that I want to ask about. After explaining the anchors and their use, I note that you didn&#8217;t actually have them in place on your examples in the captures section. Now is that just accidental, or is there a cunning rationale to that which I&#8217;m missing?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

