<?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: java.lang.IllegalArgumentException: Illegal group reference in String.replaceAll</title>
	<atom:link href="http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/feed/" rel="self" type="application/rss+xml" />
	<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/</link>
	<description>Java, web and design</description>
	<lastBuildDate>Sun, 20 May 2012 11:47:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Raghavan alias Saravanan M</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1162</link>
		<dc:creator>Raghavan alias Saravanan M</dc:creator>
		<pubDate>Sat, 15 Oct 2011 09:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1162</guid>
		<description>A good post!

// This incident reminds me that debugging can teach us a lot than the actual development.//

Well said :)</description>
		<content:encoded><![CDATA[<p>A good post!</p>
<p>// This incident reminds me that debugging can teach us a lot than the actual development.//</p>
<p>Well said <img src='http://veerasundar.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali Hammad</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1161</link>
		<dc:creator>Ali Hammad</dc:creator>
		<pubDate>Fri, 14 Oct 2011 11:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1161</guid>
		<description>Thank you very much Veera, that solved my problem. A huge string that may take a whole day to find the error. I just removed $ and its working, wow, what a fail:P</description>
		<content:encoded><![CDATA[<p>Thank you very much Veera, that solved my problem. A huge string that may take a whole day to find the error. I just removed $ and its working, wow, what a fail:P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1160</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Thu, 28 Apr 2011 06:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1160</guid>
		<description>that should word.</description>
		<content:encoded><![CDATA[<p>that should word.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philon</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1159</link>
		<dc:creator>Philon</dc:creator>
		<pubDate>Wed, 27 Apr 2011 12:24:39 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1159</guid>
		<description>dudes,

	String oldPattern = Pattern.quote( aOldPattern );
	String newPattern = Matcher.quoteReplacement( aNewPattern );
	return aInput.replaceAll( oldPattern, newPattern );</description>
		<content:encoded><![CDATA[<p>dudes,</p>
<p>	String oldPattern = Pattern.quote( aOldPattern );<br />
	String newPattern = Matcher.quoteReplacement( aNewPattern );<br />
	return aInput.replaceAll( oldPattern, newPattern );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thizz</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1158</link>
		<dc:creator>thizz</dc:creator>
		<pubDate>Fri, 29 Oct 2010 10:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1158</guid>
		<description>thx you saved a lot of my time</description>
		<content:encoded><![CDATA[<p>thx you saved a lot of my time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1157</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Mon, 25 Jan 2010 07:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1157</guid>
		<description>according to the API documentation of &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Matcher.html#appendReplacement%28java.lang.StringBuffer,%20java.lang.String%29&quot; rel=&quot;nofollow&quot;&gt;Matcher.appendReplacement&lt;/a&gt; method,
&lt;blockquote&gt;
The replacement string may contain references to subsequences captured during the previous match: Each occurrence of $g will be replaced by the result of evaluating group(g).&lt;/blockquote&gt;

and that&#039;s what I meant by &lt;i&gt;grouping&lt;/i&gt;.</description>
		<content:encoded><![CDATA[<p>according to the API documentation of <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Matcher.html#appendReplacement%28java.lang.StringBuffer,%20java.lang.String%29" rel="nofollow">Matcher.appendReplacement</a> method,</p>
<blockquote><p>
The replacement string may contain references to subsequences captured during the previous match: Each occurrence of $g will be replaced by the result of evaluating group(g).</p></blockquote>
<p>and that&#8217;s what I meant by <i>grouping</i>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sreenivas</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1156</link>
		<dc:creator>Sreenivas</dc:creator>
		<pubDate>Mon, 25 Jan 2010 05:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1156</guid>
		<description>Veera, the replaceAll method takes in regular expressions as the parameter and &#039;$&#039; in regex is a special character that represents end of a line. 

Grouping, on the other hand is done using parantheses.</description>
		<content:encoded><![CDATA[<p>Veera, the replaceAll method takes in regular expressions as the parameter and &#8216;$&#8217; in regex is a special character that represents end of a line. </p>
<p>Grouping, on the other hand is done using parantheses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1155</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Thu, 21 Jan 2010 03:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1155</guid>
		<description>I haven&#039;t tested the code for other regex symbols, but I guess those symbols also should be escaped.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t tested the code for other regex symbols, but I guess those symbols also should be escaped.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JB</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1154</link>
		<dc:creator>JB</dc:creator>
		<pubDate>Thu, 21 Jan 2010 00:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1154</guid>
		<description>Yes, debugging teaches a few lessons.

I thought it was due to $ being a regex symbol. Pardon me, I am not a Java programmer, but know javascripting.

java.util.regex namespace gave me solace :-)

Did you try with other regex symbols like ^</description>
		<content:encoded><![CDATA[<p>Yes, debugging teaches a few lessons.</p>
<p>I thought it was due to $ being a regex symbol. Pardon me, I am not a Java programmer, but know javascripting.</p>
<p>java.util.regex namespace gave me solace <img src='http://veerasundar.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Did you try with other regex symbols like ^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comment-1153</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Wed, 20 Jan 2010 15:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-1153</guid>
		<description>agreed. Otherwise it is little difficult to figure it out why the replaceAll() method fails.</description>
		<content:encoded><![CDATA[<p>agreed. Otherwise it is little difficult to figure it out why the replaceAll() method fails.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

