<?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: Adding space before and after parentheses</title>
	<atom:link href="http://flexoop.com/2008/05/adding-space-before-and-after-parentheses/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexoop.com/2008/05/adding-space-before-and-after-parentheses/</link>
	<description>Flex, AIR, ColdFusion, and everything in between</description>
	<lastBuildDate>Mon, 26 Jul 2010 19:48:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Gareth</title>
		<link>http://flexoop.com/2008/05/adding-space-before-and-after-parentheses/comment-page-1/#comment-670</link>
		<dc:creator>Gareth</dc:creator>
		<pubDate>Wed, 05 Aug 2009 00:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://flexfusion.archfamily.com/?p=16#comment-670</guid>
		<description>Hi Kathy,
I think I see what the error is...it looks like you forgot the + after the capturing element, so
ParameterExists\(((.)+)\)
However, using that &quot;greedy&quot; capture, it will keep going until it finds the last parenthesis (I wasn&#039;t sure, so I ran a quick test :))
The way I usually handle this is to do something like this:
ParameterExists\(([^\)]+)\)
This says find ParameterExists( then match all &quot;non-closing parenthesis characters&quot;, then match ).  This way it finds the first closing parenthesis it comes across and stops matching, rather than the last.

and for the replace statement, you shouldn&#039;t need to escape the characters, so
IsDefined(&quot;$1&quot;)
should work nicely for you

Hope this helps, and thanks for reading.</description>
		<content:encoded><![CDATA[<p>Hi Kathy,<br />
I think I see what the error is&#8230;it looks like you forgot the + after the capturing element, so<br />
ParameterExists\(((.)+)\)<br />
However, using that &#8220;greedy&#8221; capture, it will keep going until it finds the last parenthesis (I wasn&#8217;t sure, so I ran a quick test <img src='http://flexoop.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )<br />
The way I usually handle this is to do something like this:<br />
ParameterExists\(([^\)]+)\)<br />
This says find ParameterExists( then match all &#8220;non-closing parenthesis characters&#8221;, then match ).  This way it finds the first closing parenthesis it comes across and stops matching, rather than the last.</p>
<p>and for the replace statement, you shouldn&#8217;t need to escape the characters, so<br />
IsDefined(&#8220;$1&#8243;)<br />
should work nicely for you</p>
<p>Hope this helps, and thanks for reading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kathy</title>
		<link>http://flexoop.com/2008/05/adding-space-before-and-after-parentheses/comment-page-1/#comment-669</link>
		<dc:creator>Kathy</dc:creator>
		<pubDate>Tue, 04 Aug 2009 18:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://flexfusion.archfamily.com/?p=16#comment-669</guid>
		<description>Hi Gareth,

Thanks for the useful articles on regular expressions.

I wonder if you could help with a problem I&#039;m having:

I&#039;m trying to replace ParameterExists(someVar) with IsDefined(&quot;someVar&quot;)
someVar can contain any characters

I thought the Find expression would be ParameterExists\((.)\) and the Replace expression would be IsDefined(\&quot;$1\&quot;)

However the Find expression is not working.

Can you see my error?

Thanks,
Kathy</description>
		<content:encoded><![CDATA[<p>Hi Gareth,</p>
<p>Thanks for the useful articles on regular expressions.</p>
<p>I wonder if you could help with a problem I&#8217;m having:</p>
<p>I&#8217;m trying to replace ParameterExists(someVar) with IsDefined(&#8220;someVar&#8221;)<br />
someVar can contain any characters</p>
<p>I thought the Find expression would be ParameterExists\((.)\) and the Replace expression would be IsDefined(\&#8221;$1\&#8221;)</p>
<p>However the Find expression is not working.</p>
<p>Can you see my error?</p>
<p>Thanks,<br />
Kathy</p>
]]></content:encoded>
	</item>
</channel>
</rss>
