<?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: replacing many grouped regular expression matches in powershell</title>
	<atom:link href="http://karlprosser.com/coder/2010/01/11/replacing-many-grouped-regular-expression-matches-in-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://karlprosser.com/coder/2010/01/11/replacing-many-grouped-regular-expression-matches-in-powershell/</link>
	<description>invoke-intelligence &#124; where { $_.necessary }</description>
	<lastBuildDate>Thu, 19 Apr 2012 17:42:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: stej</title>
		<link>http://karlprosser.com/coder/2010/01/11/replacing-many-grouped-regular-expression-matches-in-powershell/comment-page-1/#comment-996</link>
		<dc:creator>stej</dc:creator>
		<pubDate>Sun, 17 Jan 2010 21:58:56 +0000</pubDate>
		<guid isPermaLink="false">http://karlprosser.com/coder/?p=72#comment-996</guid>
		<description>(some characters were removed so I&#039;ll try the oneliner again:

$example -replace &#039;wiki://(?(?\d+)_(?\d+))&#039;,&#039;${folder}/${page}/index.html&#039;

$example -replace &#039;wiki://(?&lt;wholething&gt;(?&lt;folder&gt;\d+)_(?&lt;page&gt;\d+))&#039;,&#039;${folder}/${page}/index.html&#039;

One of them should be correct :) )</description>
		<content:encoded><![CDATA[<p>(some characters were removed so I&#8217;ll try the oneliner again:</p>
<p>$example -replace &#8216;wiki://(?(?\d+)_(?\d+))&#8217;,'${folder}/${page}/index.html&#8217;</p>
<p>$example -replace &#8216;wiki://(?&lt;wholething&gt;(?&lt;folder&gt;\d+)_(?&lt;page&gt;\d+))&#8217;,'${folder}/${page}/index.html&#8217;</p>
<p>One of them should be correct <img src='http://karlprosser.com/coder/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://karlprosser.com/coder/2010/01/11/replacing-many-grouped-regular-expression-matches-in-powershell/comment-page-1/#comment-993</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Fri, 15 Jan 2010 14:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://karlprosser.com/coder/?p=72#comment-993</guid>
		<description>lol, i can&#039;t believe i didn&#039;t know that. I had thought that -replace only did the first item. I&#039;ll have to look at other things and remember while i abandoned the built in -match and -replace and went to dotnet methods. There was a reason but i must have remembered it falsely. Thanks guys</description>
		<content:encoded><![CDATA[<p>lol, i can&#8217;t believe i didn&#8217;t know that. I had thought that -replace only did the first item. I&#8217;ll have to look at other things and remember while i abandoned the built in -match and -replace and went to dotnet methods. There was a reason but i must have remembered it falsely. Thanks guys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Archer</title>
		<link>http://karlprosser.com/coder/2010/01/11/replacing-many-grouped-regular-expression-matches-in-powershell/comment-page-1/#comment-991</link>
		<dc:creator>Jason Archer</dc:creator>
		<pubDate>Mon, 11 Jan 2010 17:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://karlprosser.com/coder/?p=72#comment-991</guid>
		<description>A nice simple example of using user provided script blocks.  Thanks.

BTW, the particular task you were doing could be accomplished without custom code:

$example -replace &#039;wiki://(\d+)_(\d+)&#039;,&#039;$1/$2/index.html&#039;

But there are some cases where the regex could be simplified by using code to assist in the processing.</description>
		<content:encoded><![CDATA[<p>A nice simple example of using user provided script blocks.  Thanks.</p>
<p>BTW, the particular task you were doing could be accomplished without custom code:</p>
<p>$example -replace &#8216;wiki://(\d+)_(\d+)&#8217;,'$1/$2/index.html&#8217;</p>
<p>But there are some cases where the regex could be simplified by using code to assist in the processing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stej</title>
		<link>http://karlprosser.com/coder/2010/01/11/replacing-many-grouped-regular-expression-matches-in-powershell/comment-page-1/#comment-990</link>
		<dc:creator>stej</dc:creator>
		<pubDate>Mon, 11 Jan 2010 10:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://karlprosser.com/coder/?p=72#comment-990</guid>
		<description>Just a note for readers: it is possible to do it in this way:

$example -replace &#039;wiki://(?(?\d+)_(?\d+))&#039;,&#039;${folder}/${page}/index.html&#039;

However, it&#039;s a nice demonstration how to use variables and scriptblocks.</description>
		<content:encoded><![CDATA[<p>Just a note for readers: it is possible to do it in this way:</p>
<p>$example -replace &#8216;wiki://(?(?\d+)_(?\d+))&#8217;,'${folder}/${page}/index.html&#8217;</p>
<p>However, it&#8217;s a nice demonstration how to use variables and scriptblocks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

