<?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 developer working at PayPal, India.</description>
	<lastBuildDate>Wed, 08 Sep 2010 07:07:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Veera</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/comment-page-1/#comment-2474</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-2474</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-page-1/#comment-2473</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-2473</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-page-1/#comment-2463</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-2463</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-page-1/#comment-2462</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-2462</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-page-1/#comment-2461</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-2461</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>
	<item>
		<title>By: Mohammed Yousuff</title>
		<link>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/comment-page-1/#comment-2460</link>
		<dc:creator>Mohammed Yousuff</dc:creator>
		<pubDate>Wed, 20 Jan 2010 14:02:04 +0000</pubDate>
		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239#comment-2460</guid>
		<description>Good one. I believe String class should say the same docs as it was in Matcher.replaceAll() which is added in string.replaceAll()....</description>
		<content:encoded><![CDATA[<p>Good one. I believe String class should say the same docs as it was in Matcher.replaceAll() which is added in string.replaceAll()&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
