<?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 3 *Solutions* from Expert Commentators (Beginner and Advanced; the shot put)</title><link>http://blogs.technet.com/heyscriptingguy/archive/2009/06/16/hey-scripting-guy-event-3-solutions-from-expert-commentators-beginner-and-advanced-the-shot-put.aspx</link><description>( Note : These solutions were written for Event 3 .) Beginner Event 3: The Shot Put In the shot put event, you must be able to handle a heavy load of text. To make it easier for you to carry the load, you will be asked to balance text between two files.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Everything Scripting Games (come here if you are lost)</title><link>http://blogs.technet.com/heyscriptingguy/archive/2009/06/16/hey-scripting-guy-event-3-solutions-from-expert-commentators-beginner-and-advanced-the-shot-put.aspx#3255707</link><pubDate>Wed, 17 Jun 2009 10:28:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3255707</guid><dc:creator>Hey, Scripting Guy!</dc:creator><description>&lt;p&gt;All the Scripting Games links in one location! Let the learning begin. (We will update this page every&lt;/p&gt;
</description></item><item><title>re: Hey, Scripting Guy! Event 3 *Solutions* from Expert Commentators (Beginner and Advanced; the shot put)</title><link>http://blogs.technet.com/heyscriptingguy/archive/2009/06/16/hey-scripting-guy-event-3-solutions-from-expert-commentators-beginner-and-advanced-the-shot-put.aspx#3255769</link><pubDate>Wed, 17 Jun 2009 13:51:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3255769</guid><dc:creator>KSchulte</dc:creator><description>&lt;p&gt;Hello Scripting guys,&lt;/p&gt;
&lt;p&gt;thank you very much for the wonderful solutions again! Brilliant ... and I really begin to like that powershell stuff :-)&lt;/p&gt;
&lt;p&gt;@Shay: You lost the &amp;quot;Measure-Object&amp;quot; somewhere ... somehow *sss*&lt;/p&gt;
&lt;p&gt;Your solution will not meet condition 2:&lt;/p&gt;
&lt;p&gt;&amp;quot;The same vowel can appear more than once in the same word (for example, &amp;quot;good&amp;quot;)&amp;quot;&lt;/p&gt;
&lt;p&gt;If you look at the notepad output, you will be missing the &amp;quot;sweeten&amp;quot; e.g. at the end:&lt;/p&gt;
&lt;p&gt;whom&lt;/p&gt;
&lt;p&gt;sweeten&lt;/p&gt;
&lt;p&gt;sow&lt;/p&gt;
&lt;p&gt;So I would add the &amp;quot;Measure-Object&amp;quot; again:&lt;/p&gt;
&lt;p&gt;Get-Content .\Wordlist_ADV3.txt | &lt;/p&gt;
&lt;p&gt;Where-Object { ($_.ToCharArray() -match '[aeiou]' | &lt;/p&gt;
&lt;p&gt;Group-Object | Measure-Object).Count -eq 1 } | &lt;/p&gt;
&lt;p&gt;Out-File -FilePath .\univowel.txt -Encoding ASCII&lt;/p&gt;
&lt;p&gt;and it will produce the same results as my regex:&lt;/p&gt;
&lt;p&gt;gc Wordlist_ADV3.txt | %{ if ($_ -match &amp;quot;^[^aeiou]*([aeiou])([^aeiou]|\1)*$&amp;quot;) { $_ }} | Out-File Univowel.txt ASCII&lt;/p&gt;
&lt;p&gt;kind regards, Klaus&lt;/p&gt;
</description></item></channel></rss>