<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - flash - 9.0 - ActionScriptLangRefV3 - String.html</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T00:09:19</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html#82664" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html#82609" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html#82664">
		<title>flash/9.0/ActionScriptLangRefV3/String.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html#82664</link>
		<description>The documentation is partly correct. If the nth capture group is undefined, but less than the number of capture groups in the pattern, then the replacement text is an empty string. (This can occur if there is a group that captures an optional match that was not found, e.g. &quot;(xyz)?&quot;.)&lt;br&gt;&lt;br&gt;If &quot;n&quot; or &quot;nn&quot; is greater than the number of capture groups, then it is not recognized as a valid replacement code and is just treated as a string, as demonstrated by your example. Also, if, for example, the replacement code &quot;$14&quot; is used when there is a single capture group, the &quot;$1&quot; portion will be replaced, but the 4 will remain.&lt;br&gt;&lt;br&gt;Finally, there seems to be a bug when using &quot;0&quot; as the first digit in &quot;$nn&quot;. The replacement code is replaced by the captured text, but the second digit is tacked onto the end of the replacement text.&lt;br&gt;Thus:&lt;br&gt;var str:String = &quot;The fun dog.&quot;;&lt;br&gt;trace(str.replace(/(fun)/ig,&quot;$01&quot;)); //&quot;The fun1 dog.&quot;&lt;br&gt;  &lt;br&gt;To avoid this problem, don't use replacement codes with a leading zero. I.e. use &quot;$1-$9&quot;, not &quot;$01-$09&quot;.</description>
		<dc:creator>Joe ... Ward</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2008-04-04T11:28:24</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html#82609">
		<title>flash/9.0/ActionScriptLangRefV3/String.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html#82609</link>
		<description>why does String#match yield different results based on the global flag, whereas RegExp#test and String#search behave consistently?&lt;br /&gt;&lt;br /&gt;var rx:RegExp = /\d/&lt;br /&gt;var s:String = &quot;very interesting&quot;;&lt;br /&gt;&lt;br /&gt;trace(s.match(rx) == null); // true&lt;br /&gt;trace(rx.test(s)); // false&lt;br /&gt;trace(s.search(rx)); // -1&lt;br /&gt;&lt;br /&gt;but:&lt;br /&gt;&lt;br /&gt;rx = /\d/g&lt;br /&gt;&lt;br /&gt;trace(s.match(rx) == null); // false&lt;br /&gt;trace(rx.test(s)); // false&lt;br /&gt;trace(s.search(rx)); // -1&lt;br /&gt;&lt;br /&gt;I would expect #match to return null when looking for digits (global flag) in the string &quot;very interesting&quot;...&lt;br /&gt;&lt;br /&gt;or did I just miss something in the docs?</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-04-03T08:41:27</dc:date>
	</item>
	</rdf:RDF>

