<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Hey, Scripting Guy! Event 1 *Solutions* from Expert Commentators (Beginner and Advanced; 100-meter dash)</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2009/06/14/hey-scripting-guy-event-1-solutions-from-expert-commentators-beginner-and-advanced-100-meter-dash.aspx</link><description>( Note : These solutions were written for Event 1 .) 
 Beginner Event 1: The 100-Meter Dash 
 In the 100-meter event, you will be given the finish times of our runners. You will be asked to sort them and rank the gold, silver, and bronze winners. </description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Powershell advanced</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2009/06/14/hey-scripting-guy-event-1-solutions-from-expert-commentators-beginner-and-advanced-100-meter-dash.aspx#3255461</link><pubDate>Tue, 16 Jun 2009 17:11:48 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3255461</guid><dc:creator>patrikse</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;what a great and simple solution for the advanced Powershell. The output will look a bit strange if the lines which are starting with a white-space gets enumerated.&lt;/p&gt;
&lt;p&gt;To prevent this, I put the text file in an array and TRIM'ed away the white space for each entry. Output and sorted for the rest just like you did.&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;Patrik&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3255461" width="1" height="1"&gt;</description></item><item><title>re: Hey, Scripting Guy! Event 1 *Solutions* from Expert Commentators (Beginner and Advanced; 100-meter dash)</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2009/06/14/hey-scripting-guy-event-1-solutions-from-expert-commentators-beginner-and-advanced-100-meter-dash.aspx#3254991</link><pubDate>Mon, 15 Jun 2009 17:40:24 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3254991</guid><dc:creator>smurawski</dc:creator><description>&lt;p&gt;Klaus,&lt;/p&gt;
&lt;p&gt;Right you are. &amp;nbsp;I actually caught that after I had submitted my solution a while ago and wanted to change my regexs to &lt;/p&gt;
&lt;p&gt;PowerShell -&lt;/p&gt;
&lt;p&gt;&amp;quot;^(?&amp;lt;Name&amp;gt;\w+?,\ .+?)\t(?&amp;lt;Country&amp;gt;.+?)\s+(?&amp;lt;Time&amp;gt;\d+\.\d+)$&amp;quot;&lt;/p&gt;
&lt;p&gt;and Vbscript should be&lt;/p&gt;
&lt;p&gt;&amp;quot;^(\w+?,\ .+?)\t(.+?)\s+(\d+\.\d+)$&amp;quot;&lt;/p&gt;
&lt;p&gt;but it was a bit too late.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3254991" width="1" height="1"&gt;</description></item><item><title>re: Hey, Scripting Guy! Event 1 *Solutions* from Expert Commentators (Beginner and Advanced; 100-meter dash)</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2009/06/14/hey-scripting-guy-event-1-solutions-from-expert-commentators-beginner-and-advanced-100-meter-dash.aspx#3254910</link><pubDate>Mon, 15 Jun 2009 14:56:56 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3254910</guid><dc:creator>KSchulte</dc:creator><description>&lt;p&gt;Dear Scripting Guys,&lt;/p&gt;
&lt;p&gt;I just worked a little bit through the description of event 1 and read the solutions here :-) &lt;/p&gt;
&lt;p&gt;Wonderful solutions, and I wonder, if I should add another, less brilliant, one to these!&lt;/p&gt;
&lt;p&gt;One note to Steven's solution:&lt;/p&gt;
&lt;p&gt;I would change the &lt;/p&gt;
&lt;p&gt;[regex]$regex = &amp;quot;^(?&amp;lt;Name&amp;gt;\w+?,\ \w+?)\s+(?&amp;lt;Country&amp;gt;.+?)\s+(?&amp;lt;Time&amp;gt;\d+\.\d+)$&amp;quot;&lt;/p&gt;
&lt;p&gt;to &lt;/p&gt;
&lt;p&gt;[regex]$regex = &amp;quot;^(?&amp;lt;Name&amp;gt;[^\t]+)\t(?&amp;lt;Country&amp;gt;[^\t]+)\t(?&amp;lt;Time&amp;gt;\d+\.\d+)$&amp;quot;&lt;/p&gt;
&lt;p&gt;Why? Not, because this one is shorter :-) it is a little bit &amp;quot;more correct&amp;quot; because you can't decide whether&lt;/p&gt;
&lt;p&gt;Hansen, Anne Grethe	Japan	8.85&lt;/p&gt;
&lt;p&gt;is a two components first name or you have a country with two components like in:&lt;/p&gt;
&lt;p&gt;Pfeiffer, Michael	United States	8.85&lt;/p&gt;
&lt;p&gt;In fact I thought that this problem couldn't be solved at first sight, but a close look into the text file revealed, that the three components are seperated by TAB characters, which makes it well possible to seperate the three parts correctly!&lt;/p&gt;
&lt;p&gt;kind regards, Klaus&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3254910" width="1" height="1"&gt;</description></item><item><title>Everything Scripting Games (come here if you are lost)</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2009/06/14/hey-scripting-guy-event-1-solutions-from-expert-commentators-beginner-and-advanced-100-meter-dash.aspx#3254777</link><pubDate>Mon, 15 Jun 2009 10:05:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3254777</guid><dc:creator>Hey, Scripting Guy!</dc:creator><description>&lt;p&gt;All the Scripting Games links in one location! Let the learning begin. Review Submitted Scripts Event&lt;/p&gt;
&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3254777" width="1" height="1"&gt;</description></item></channel></rss>