<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Regex 101 Answer I10 - Extract repeating hex blocks from a string</title><link>http://blogs.msdn.com/b/ericgu/archive/2006/03/14/551275.aspx</link><description>Regex 101 Exercise I10 - Extract repeating hex blocks from a string Given the string: 
 PCORR:BLOCK=V5CCH,IA=H'22EF&amp;amp;H'2354&amp;amp;H'4BD4&amp;amp;H'4C4B&amp;amp;H'4D52&amp;amp;H'4DC9; 
 Extract all the hex numbers in the form “H’xxxx” 
 ***** 
 You can match</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title> Eric Gunnerson s C Compendium Regex 101 Answer I10 Extract | Quick Diets</title><link>http://blogs.msdn.com/b/ericgu/archive/2006/03/14/551275.aspx#9715320</link><pubDate>Tue, 09 Jun 2009 14:19:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9715320</guid><dc:creator> Eric Gunnerson s C Compendium Regex 101 Answer I10 Extract | Quick Diets</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://quickdietsite.info/story.php?id=4517"&gt;http://quickdietsite.info/story.php?id=4517&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9715320" width="1" height="1"&gt;</description></item><item><title>re: Regex 101 Answer I10 - Extract repeating hex blocks from a string</title><link>http://blogs.msdn.com/b/ericgu/archive/2006/03/14/551275.aspx#553297</link><pubDate>Fri, 17 Mar 2006 02:19:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:553297</guid><dc:creator>kbiel</dc:creator><description>(H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4})[&amp;amp;;])+&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=553297" width="1" height="1"&gt;</description></item><item><title>re: Regex 101 Answer I10 - Extract repeating hex blocks from a string</title><link>http://blogs.msdn.com/b/ericgu/archive/2006/03/14/551275.aspx#551335</link><pubDate>Tue, 14 Mar 2006 20:22:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:551335</guid><dc:creator>Maurits [MSFT]</dc:creator><description>Er, the + is superfluous on my last regex. &amp;nbsp;Should be:&lt;br&gt;H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4})(&amp;amp;H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4}))*&lt;br&gt;&lt;br&gt;or better&lt;br&gt;&lt;br&gt;H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4}) # first hex number&lt;br&gt;(&lt;br&gt;__ &amp;amp; # second and further hex numbers are separated with &amp;amp;&lt;br&gt;__ H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4}) # second and further hex number&lt;br&gt;)* # further hex numbers are optional&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=551335" width="1" height="1"&gt;</description></item><item><title>re: Regex 101 Answer I10 - Extract repeating hex blocks from a string</title><link>http://blogs.msdn.com/b/ericgu/archive/2006/03/14/551275.aspx#551331</link><pubDate>Tue, 14 Mar 2006 20:19:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:551331</guid><dc:creator>Maurits [MSFT]</dc:creator><description>Actually your last pattern misses the final hex number... unless you do something like&lt;br&gt;&lt;br&gt;r.Match(str + &amp;quot;&amp;amp;&amp;quot;)&lt;br&gt;&lt;br&gt;or&lt;br&gt;&lt;br&gt;(H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4})&amp;amp;?)+&lt;br&gt;&lt;br&gt;or&lt;br&gt;&lt;br&gt;(H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4})(&amp;amp;H'(?&amp;lt;Values&amp;gt;[0-9a-fA-F]{4}))*)+&lt;br&gt;&lt;br&gt;(...or does that not work? &amp;nbsp;it seems suspicious to have two capturing clauses with the same name...)&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=551331" width="1" height="1"&gt;</description></item></channel></rss>