<?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: /(bb&#124;[^b]{2})/</title>
	<atom:link href="http://blog.stevenlevithan.com/archives/2b-or-not-2b/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.stevenlevithan.com/archives/2b-or-not-2b</link>
	<description>A JavaScript and regular expression centric blog</description>
	<lastBuildDate>Fri, 12 Mar 2010 20:14:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jack</title>
		<link>http://blog.stevenlevithan.com/archives/2b-or-not-2b/comment-page-1#comment-25554</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Wed, 11 Feb 2009 18:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/2b-or-not-2b#comment-25554</guid>
		<description>Late to the party but I was searching your blog for the answer to something... and well while y&#039;all can fight all you want about the regex I&#039;m going to take exception to:

var answer = 

it should be:

var question = 

:-P</description>
		<content:encoded><![CDATA[<p>Late to the party but I was searching your blog for the answer to something&#8230; and well while y&#8217;all can fight all you want about the regex I&#8217;m going to take exception to:</p>
<p>var answer = </p>
<p>it should be:</p>
<p>var question = </p>
<p> <img src='http://blog.stevenlevithan.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Z</title>
		<link>http://blog.stevenlevithan.com/archives/2b-or-not-2b/comment-page-1#comment-25113</link>
		<dc:creator>Z</dc:creator>
		<pubDate>Fri, 12 Dec 2008 21:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/2b-or-not-2b#comment-25113</guid>
		<description>@ William &quot;The Ownage&quot; Bowen on 4 December 2007:


one word. ROFL.</description>
		<content:encoded><![CDATA[<p>@ William &#8220;The Ownage&#8221; Bowen on 4 December 2007:</p>
<p>one word. ROFL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Levithan</title>
		<link>http://blog.stevenlevithan.com/archives/2b-or-not-2b/comment-page-1#comment-21420</link>
		<dc:creator>Steven Levithan</dc:creator>
		<pubDate>Wed, 28 May 2008 17:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/2b-or-not-2b#comment-21420</guid>
		<description>&lt;blockquote&gt;/bb&#124;.*/s and /(bb&#124;[^b]{2})/ arenâ€™t equivalent my friend =)&lt;/blockquote&gt;

No kidding. :-) That&#039;s why I posted my implementation. Anything other than &quot;bb&quot; (including the empty string) is not &quot;bb&quot;. Therefore I read my regex as &quot;two Bs or anything other than two Bs&quot;, while I read the original as &quot;two Bs or any two non-Bs, captured to group one&quot;. I read your regexes here as &quot;over-engineered, inefficient patterns that simply match any position or any two, non-line break characters.&quot; :-P Mine can alternatively be read as &quot;match either &#039;bb&#039; or the first line of the subject string.&quot;</description>
		<content:encoded><![CDATA[<blockquote><p>/bb|.*/s and /(bb|[^b]{2})/ arenâ€™t equivalent my friend =)</p></blockquote>
<p>No kidding. <img src='http://blog.stevenlevithan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  That&#8217;s why I posted my implementation. Anything other than &#8220;bb&#8221; (including the empty string) is not &#8220;bb&#8221;. Therefore I read my regex as &#8220;two Bs or anything other than two Bs&#8221;, while I read the original as &#8220;two Bs or any two non-Bs, captured to group one&#8221;. I read your regexes here as &#8220;over-engineered, inefficient patterns that simply match any position or any two, non-line break characters.&#8221; <img src='http://blog.stevenlevithan.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  Mine can alternatively be read as &#8220;match either &#8216;bb&#8217; or the first line of the subject string.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blog.stevenlevithan.com/archives/2b-or-not-2b/comment-page-1#comment-21417</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Wed, 28 May 2008 17:39:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/2b-or-not-2b#comment-21417</guid>
		<description>/bb&#124;.*/s and /(bb&#124;[^b]{2})/ aren&#039;t equivalent my friend =)

Any single-character string is matched by yours but not the original.  Also any two-character string containing only one b.  In fact, yours will match anything including an empty string.

It&#039;s funny to see Azat came up with essentially the same answer I did =)  Except one half of his alternation consumes while the other half doesn&#039;t - which might be his intention, but it&#039;s more likely you&#039;d want both sides of the alternation to consume, or neither side to consume.  That&#039;s why I prefer /(?=bb)&#124;(?!bb)/ (non-consuming) or /(?:(?=bb)&#124;(?!bb))../.  

This last one can be reduced to /.{2}/, but that doesn&#039;t read quite as well =)</description>
		<content:encoded><![CDATA[<p>/bb|.*/s and /(bb|[^b]{2})/ aren&#8217;t equivalent my friend =)</p>
<p>Any single-character string is matched by yours but not the original.  Also any two-character string containing only one b.  In fact, yours will match anything including an empty string.</p>
<p>It&#8217;s funny to see Azat came up with essentially the same answer I did =)  Except one half of his alternation consumes while the other half doesn&#8217;t &#8211; which might be his intention, but it&#8217;s more likely you&#8217;d want both sides of the alternation to consume, or neither side to consume.  That&#8217;s why I prefer /(?=bb)|(?!bb)/ (non-consuming) or /(?:(?=bb)|(?!bb))../.  </p>
<p>This last one can be reduced to /.{2}/, but that doesn&#8217;t read quite as well =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Lorre</title>
		<link>http://blog.stevenlevithan.com/archives/2b-or-not-2b/comment-page-1#comment-16635</link>
		<dc:creator>Peter Lorre</dc:creator>
		<pubDate>Wed, 26 Mar 2008 21:03:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/2b-or-not-2b#comment-16635</guid>
		<description>debugging girls?? Methinks you need to de-louse her first... creepy ;-)</description>
		<content:encoded><![CDATA[<p>debugging girls?? Methinks you need to de-louse her first&#8230; creepy <img src='http://blog.stevenlevithan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
