<?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: Capturing Multiple, Optional HTML Attribute Values</title>
	<atom:link href="http://blog.stevenlevithan.com/archives/multi-attr-capture/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.stevenlevithan.com/archives/multi-attr-capture</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: Daan</title>
		<link>http://blog.stevenlevithan.com/archives/multi-attr-capture/comment-page-1#comment-119259</link>
		<dc:creator>Daan</dc:creator>
		<pubDate>Sun, 24 Jul 2011 18:50:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/multi-attr-capture#comment-119259</guid>
		<description>Wow, this is great man, tnx very muchos!</description>
		<content:encoded><![CDATA[<p>Wow, this is great man, tnx very muchos!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ridgerunner</title>
		<link>http://blog.stevenlevithan.com/archives/multi-attr-capture/comment-page-1#comment-58316</link>
		<dc:creator>ridgerunner</dc:creator>
		<pubDate>Fri, 20 Aug 2010 22:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/multi-attr-capture#comment-58316</guid>
		<description>Just when one thinks one has become a &quot;Regex Master&quot;, how soon we are humbled to learn new tricks that define a previously hidden new higher level. After taking the time to absorb the subtleties embedded in this post, I come away richer.

I learned 2 new tricks:
1.) How to capture randomly ordered items in a known order.
2.) How to simulate atomic grouping by combining lookahead with a sacrificial capture group.

Both are gems. Thank you!</description>
		<content:encoded><![CDATA[<p>Just when one thinks one has become a &#8220;Regex Master&#8221;, how soon we are humbled to learn new tricks that define a previously hidden new higher level. After taking the time to absorb the subtleties embedded in this post, I come away richer.</p>
<p>I learned 2 new tricks:<br />
1.) How to capture randomly ordered items in a known order.<br />
2.) How to simulate atomic grouping by combining lookahead with a sacrificial capture group.</p>
<p>Both are gems. Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kurt</title>
		<link>http://blog.stevenlevithan.com/archives/multi-attr-capture/comment-page-1#comment-53746</link>
		<dc:creator>kurt</dc:creator>
		<pubDate>Mon, 07 Jun 2010 16:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/multi-attr-capture#comment-53746</guid>
		<description>How would one make sure at least n attributes are matched?
 
I have the following:

(?:&lt;SPAN&#124;&lt;span)+\b(?:(?=(\s+(?:datafield=&quot;?([^&quot;&#124;\s&#124;&gt;]*)&quot;?&#124;class=&quot;?dataElement&quot;?&#124;id=&quot;?([^&quot;&#124;\s&#124;&gt;]*)&quot;?)&#124;[^\s&gt;]+&#124;\s+))\1)*&gt;(.*?)(?:&lt;/SPAN&gt;&#124;&lt;/span&gt;)

And I would ideally like to match span&#039;s that have datafield, dataelement and id (in any order). I&#039;ve tried using {3,} but I don&#039;t think it was a applied as assumed due to the last sequence in the optional capturing group that says all but &quot; \s or &gt;. Your help would be greatly appreciated.</description>
		<content:encoded><![CDATA[<p>How would one make sure at least n attributes are matched?</p>
<p>I have the following:</p>
<p>(?:&lt;SPAN|&lt;span)+\b(?:(?=(\s+(?:datafield=&#8221;?([^"|\s|&gt;]*)&#8221;?|class=&#8221;?dataElement&#8221;?|id=&#8221;?([^"|\s|&gt;]*)&#8221;?)|[^\s&gt;]+|\s+))\1)*&gt;(.*?)(?:&lt;/SPAN&gt;|&lt;/span&gt;)</p>
<p>And I would ideally like to match span&#8217;s that have datafield, dataelement and id (in any order). I&#8217;ve tried using {3,} but I don&#8217;t think it was a applied as assumed due to the last sequence in the optional capturing group that says all but &#8221; \s or &gt;. Your help would be greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blog.stevenlevithan.com/archives/multi-attr-capture/comment-page-1#comment-16644</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 27 Mar 2008 00:47:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/multi-attr-capture#comment-16644</guid>
		<description>@Philip, I&#039;m not sure I understand what you&#039;re trying to do, since bold, italic, and underline are merely values for their related CSS properties. If you&#039;re just checking for the existence of certain words within your style attribute, that&#039;s unrelated to this post. Also, you haven&#039;t mentioned which regex flavor you&#039;re using.

In any case, if you need one-on-one regex advice I&#039;d recommend &lt;a href=&quot;http://regexadvice.com&quot; rel=&quot;nofollow&quot;&gt;regexadvice.com&lt;/a&gt; or the RegexBuddy forums.</description>
		<content:encoded><![CDATA[<p>@Philip, I&#8217;m not sure I understand what you&#8217;re trying to do, since bold, italic, and underline are merely values for their related CSS properties. If you&#8217;re just checking for the existence of certain words within your style attribute, that&#8217;s unrelated to this post. Also, you haven&#8217;t mentioned which regex flavor you&#8217;re using.</p>
<p>In any case, if you need one-on-one regex advice I&#8217;d recommend <a href="http://regexadvice.com" rel="nofollow">regexadvice.com</a> or the RegexBuddy forums.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phillip</title>
		<link>http://blog.stevenlevithan.com/archives/multi-attr-capture/comment-page-1#comment-16631</link>
		<dc:creator>Phillip</dc:creator>
		<pubDate>Wed, 26 Mar 2008 19:16:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevenlevithan.com/archives/multi-attr-capture#comment-16631</guid>
		<description>Could you help me modify your regex so that it captures multiple attributes of a style? for example I want to capture only the styles bold, italics an underline.

&lt;code&gt;&lt;span style=&quot;font-style: italic; font-weight:bold; height:100px;&quot; class=&quot;class&quot; title=&quot;title&quot;&gt;styled text &lt;/span&gt; &lt;/code&gt;

many thanks</description>
		<content:encoded><![CDATA[<p>Could you help me modify your regex so that it captures multiple attributes of a style? for example I want to capture only the styles bold, italics an underline.</p>
<p><code>&lt;span style="font-style: italic; font-weight:bold; height:100px;" class="class" title="title"&gt;styled text &lt;/span&gt; </code></p>
<p>many thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

