<?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: Mimicking Atomic Groups</title>
	<atom:link href="http://blog.stevenlevithan.com/archives/mimic-atomic-groups/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.stevenlevithan.com/archives/mimic-atomic-groups</link>
	<description>A JavaScript and regular expression centric blog</description>
	<lastBuildDate>Thu, 09 Feb 2012 10:18:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Mark McDonnell</title>
		<link>http://blog.stevenlevithan.com/archives/mimic-atomic-groups/comment-page-1#comment-53226</link>
		<dc:creator>Mark McDonnell</dc:creator>
		<pubDate>Wed, 26 May 2010 09:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/?p=15#comment-53226</guid>
		<description>OMG what an idiot I am! :-$ sorry about that :)

Works like a charm now!

Thanks again for your help clearing that up for me.</description>
		<content:encoded><![CDATA[<p>OMG what an idiot I am! :-$ sorry about that <img src='http://blog.stevenlevithan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Works like a charm now!</p>
<p>Thanks again for your help clearing that up for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Levithan</title>
		<link>http://blog.stevenlevithan.com/archives/mimic-atomic-groups/comment-page-1#comment-53224</link>
		<dc:creator>Steven Levithan</dc:creator>
		<pubDate>Wed, 26 May 2010 08:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/?p=15#comment-53224</guid>
		<description>Dude, there&#039;s still a dot in your updated regex (near the end). ;-)

In any case, I can tell you that according to the ES3/5 spec the method described here should work 100% reliably (and I&#039;ve never had any problem with it in any browser or in RegexBuddy). If you find a bug in e.g. RegexBuddy&#039;s JavaScript-flavor regex emulation (which I don&#039;t think exists in this case), it would probably be best to report it on the RegexBuddy forums.</description>
		<content:encoded><![CDATA[<p>Dude, there&#8217;s still a dot in your updated regex (near the end). <img src='http://blog.stevenlevithan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In any case, I can tell you that according to the ES3/5 spec the method described here should work 100% reliably (and I&#8217;ve never had any problem with it in any browser or in RegexBuddy). If you find a bug in e.g. RegexBuddy&#8217;s JavaScript-flavor regex emulation (which I don&#8217;t think exists in this case), it would probably be best to report it on the RegexBuddy forums.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark McDonnell</title>
		<link>http://blog.stevenlevithan.com/archives/mimic-atomic-groups/comment-page-1#comment-53221</link>
		<dc:creator>Mark McDonnell</dc:creator>
		<pubDate>Wed, 26 May 2010 07:54:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/?p=15#comment-53221</guid>
		<description>Hi Steve,

Because I wanted to check out how to mimic atomic groups I changed the regex flavour to JavaScript and so now I&#039;m unable to select &quot;Dot matches new line&quot;.

I then tried changing the dot to [\S\s] but that also didn&#039;t work?

&lt;html&gt;(?=([\S\s]*?&lt;head&gt;))\1(?=([\S\s]*?&lt;title&gt;))\2(?=([\S\s]*?&lt;/title&gt;))\3(?=([\S\s]*?&lt;/head&gt;))\4(?=([\S\s]*?&lt;body[^&gt;]*&gt;))\5(?=([\S\s]*?&lt;/body&gt;))\6.*?&lt;/html&gt;</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>Because I wanted to check out how to mimic atomic groups I changed the regex flavour to JavaScript and so now I&#8217;m unable to select &#8220;Dot matches new line&#8221;.</p>
<p>I then tried changing the dot to [\S\s] but that also didn&#8217;t work?</p>
<p>&lt;html&gt;(?=([\S\s]*?&lt;head&gt;))\1(?=([\S\s]*?&lt;title&gt;))\2(?=([\S\s]*?&lt;/title&gt;))\3(?=([\S\s]*?&lt;/head&gt;))\4(?=([\S\s]*?&lt;body[^&gt;]*&gt;))\5(?=([\S\s]*?&lt;/body&gt;))\6.*?&lt;/html&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Levithan</title>
		<link>http://blog.stevenlevithan.com/archives/mimic-atomic-groups/comment-page-1#comment-53182</link>
		<dc:creator>Steven Levithan</dc:creator>
		<pubDate>Tue, 25 May 2010 14:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/?p=15#comment-53182</guid>
		<description>@Mark McDonnell, your modified regex works fine for me in RegexBuddy. Did you enable the &quot;Dot matches newline&quot; option? (When you use RegexBuddy&#039;s library it will apply appropriate options automatically for that specific regex.)</description>
		<content:encoded><![CDATA[<p>@Mark McDonnell, your modified regex works fine for me in RegexBuddy. Did you enable the &#8220;Dot matches newline&#8221; option? (When you use RegexBuddy&#8217;s library it will apply appropriate options automatically for that specific regex.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark McDonnell</title>
		<link>http://blog.stevenlevithan.com/archives/mimic-atomic-groups/comment-page-1#comment-53180</link>
		<dc:creator>Mark McDonnell</dc:creator>
		<pubDate>Tue, 25 May 2010 14:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/?p=15#comment-53180</guid>
		<description>Hi,

Just tried this via RegexBuddy and couldn&#039;t get it to match.

I took an existing regex that is part of the RegexBuddy library &quot;HTML file (atomic)&quot; which looks like this...

&lt;html&gt;(?&gt;.*?&lt;head&gt;)(?&gt;.*?&lt;title&gt;)(?&gt;.*?&lt;/title&gt;)(?&gt;.*?&lt;/head&gt;)(?&gt;.*?&lt;body[^&gt;]*&gt;)(?&gt;.*?&lt;/body&gt;).*?&lt;/html&gt;

...and then modified it to use the technique you discuss here but it doesn&#039;t work...

&lt;html&gt;(?=(.*?&lt;head&gt;))\1(?=(.*?&lt;title&gt;))\2(?=(.*?&lt;/title&gt;))\3(?=(.*?&lt;/head&gt;))\4(?=(.*?&lt;body[^&gt;]*&gt;))\5(?=(.*?&lt;/body&gt;))\6.*?&lt;/html&gt;

Any help appreciated.

M.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Just tried this via RegexBuddy and couldn&#8217;t get it to match.</p>
<p>I took an existing regex that is part of the RegexBuddy library &#8220;HTML file (atomic)&#8221; which looks like this&#8230;</p>
<p>&lt;html&gt;(?&gt;.*?&lt;head&gt;)(?&gt;.*?&lt;title&gt;)(?&gt;.*?&lt;/title&gt;)(?&gt;.*?&lt;/head&gt;)(?&gt;.*?&lt;body[^&gt;]*&gt;)(?&gt;.*?&lt;/body&gt;).*?&lt;/html&gt;</p>
<p>&#8230;and then modified it to use the technique you discuss here but it doesn&#8217;t work&#8230;</p>
<p>&lt;html&gt;(?=(.*?&lt;head&gt;))\1(?=(.*?&lt;title&gt;))\2(?=(.*?&lt;/title&gt;))\3(?=(.*?&lt;/head&gt;))\4(?=(.*?&lt;body[^&gt;]*&gt;))\5(?=(.*?&lt;/body&gt;))\6.*?&lt;/html&gt;</p>
<p>Any help appreciated.</p>
<p>M.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

