<?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>Comentarios en: Función Replace en JavaScript</title> <atom:link href="http://lineadecodigo.com/javascript/funcion-replace-en-javascript/feed/" rel="self" type="application/rss+xml" /><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/</link> <description>/* Programación en la red */</description> <lastBuildDate>Sun, 12 Feb 2012 03:07:18 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Por: Víctor Cuervo</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-50675</link> <dc:creator>Víctor Cuervo</dc:creator> <pubDate>Tue, 06 Sep 2011 22:56:42 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-50675</guid> <description>@Miguel Loza, muchas gracias.</description> <content:encoded><![CDATA[<p>@Miguel Loza, muchas gracias.</p> ]]></content:encoded> </item> <item><title>Por: Miguel Loza</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-50672</link> <dc:creator>Miguel Loza</dc:creator> <pubDate>Mon, 05 Sep 2011 16:54:18 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-50672</guid> <description>Muy buenos manual, me ayudo mucho, gracias. Felicidades</description> <content:encoded><![CDATA[<p>Muy buenos manual, me ayudo mucho, gracias. Felicidades</p> ]]></content:encoded> </item> <item><title>Por: Expresiones Regulares con Javascript &#124; Roberto.luis@UAM</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-50582</link> <dc:creator>Expresiones Regulares con Javascript &#124; Roberto.luis@UAM</dc:creator> <pubDate>Mon, 27 Jun 2011 10:21:29 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-50582</guid> <description>[...] Función Replace en Javascript [...]</description> <content:encoded><![CDATA[<p>[...] Función Replace en Javascript [...]</p> ]]></content:encoded> </item> <item><title>Por: felipe</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-49778</link> <dc:creator>felipe</dc:creator> <pubDate>Mon, 20 Sep 2010 02:37:26 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-49778</guid> <description>hola.. soy nuevo en java y ne cesito q me ayuden con esto  susede q tengo q aser un editro de texto en el q cada q de un enter guarde lo ke escrivi en un arreglo o  en una variable si puden ayudarme lo agredecere de antemano grax mi correo es yelpi250_250@hotmail.com</description> <content:encoded><![CDATA[<p>hola.. soy nuevo en java y ne cesito q me ayuden con esto  susede q tengo q aser un editro de texto en el q cada q de un enter guarde lo ke escrivi en un arreglo o  en una variable si puden ayudarme lo agredecere de antemano grax mi correo es <a
href="mailto:yelpi250_250@hotmail.com">yelpi250_250@hotmail.com</a></p> ]]></content:encoded> </item> <item><title>Por: Rizome</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-49205</link> <dc:creator>Rizome</dc:creator> <pubDate>Sat, 08 May 2010 19:53:46 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-49205</guid> <description>(actualización:)
&lt;b&gt;ASÍ:&lt;/b&gt;
texto2=texto1.replace(/\[negrita\]/gi,&quot;&lt;b&gt;&quot;);</description> <content:encoded><![CDATA[<p>(actualización:)<br
/> <b>ASÍ:</b><br
/> texto2=texto1.replace(/\[negrita\]/gi,&#8221;&lt;b&gt;&#8221;);</p> ]]></content:encoded> </item> <item><title>Por: Rizome</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-49204</link> <dc:creator>Rizome</dc:creator> <pubDate>Sat, 08 May 2010 19:48:00 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-49204</guid> <description>Los caracteres especiales, se escapan con &quot;\&quot;, y ocurre que &quot;[&quot; y &quot;]&quot; son caracteres &quot;especiales&quot;. Además, &lt;b&gt;sobran las comillas&lt;/b&gt;.
Por ello, ha de hacerse &lt;b&gt;así&lt;/b&gt;:
texto2=texto1.replace(/\[negrita\]/gi,&#039;&lt;b&gt;&#039;);</description> <content:encoded><![CDATA[<p>Los caracteres especiales, se escapan con &#8220;\&#8221;, y ocurre que &#8220;[" y "]&#8221; son caracteres &#8220;especiales&#8221;. Además, <b>sobran las comillas</b>.</p><p>Por ello, ha de hacerse <b>así</b>:<br
/> texto2=texto1.replace(/\[negrita\]/gi,&#8217;<b>&#8216;);</b></p> ]]></content:encoded> </item> <item><title>Por: seba64</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-49202</link> <dc:creator>seba64</dc:creator> <pubDate>Sat, 08 May 2010 16:33:17 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-49202</guid> <description>y si yo quiero hacer el siguiente reemplazo para Todas las ocurrencias, como dice David
[negrita] =&gt; &lt;b&gt;
[/negrita] =&gt; &lt;/b&gt;
texto=texto.replace(&#039;[negrita]&#039;,&#039;&lt;b&gt;&#039;);       // ERROR- ERROR-
texto=texto.replace(&#039;[/negrita]&#039;,&#039;&lt;/b&gt;);     // ERROR- ERROR-
llevo ya un buen rato y no se como hacerlo, alguien que me ayude</description> <content:encoded><![CDATA[<p>y si yo quiero hacer el siguiente reemplazo para Todas las ocurrencias, como dice David</p><p> [negrita] =&gt; &lt;b&gt;<br
/> [/negrita] =&gt; &lt;/b&gt;</p><p> texto=texto.replace(&#8216;[negrita]&#8216;,&#8217;&lt;b&gt;&#8217;);       // ERROR- ERROR-<br
/> texto=texto.replace(&#8216;[/negrita]&#8216;,&#8217;&lt;/b&gt;);     // ERROR- ERROR-</p><p>llevo ya un buen rato y no se como hacerlo, alguien que me ayude</p> ]]></content:encoded> </item> <item><title>Por: seba64</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-6/#comment-49201</link> <dc:creator>seba64</dc:creator> <pubDate>Sat, 08 May 2010 16:30:25 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-49201</guid> <description>y si yo quiero hacer el siguiente reemplazo para Todas las ocurrencias, como dice David
[negrita] =&gt; &lt;b&gt;
[/negrita] =&gt; &lt;/b&gt;
texto=texto.replace(&#039;[negrita]&#039;,&#039;&lt;b&gt;&#039;);        ERROR- ERROR-
texto=texto.replace(&#039;[/negrita]&#039;,&#039;&lt;/b&gt;);      ERROR- ERROR-
llevo ya un buen rato y no se como hacerlo, alguien que me ayude</description> <content:encoded><![CDATA[<p>y si yo quiero hacer el siguiente reemplazo para Todas las ocurrencias, como dice David</p><p> [negrita] =&gt; <b><br
/> [/negrita] =&gt; </b></p><p> texto=texto.replace(&#8216;[negrita]&#8216;,&#8217;&lt;b&gt;&#8217;);        ERROR- ERROR-<br
/> texto=texto.replace(&#8216;[/negrita]&#8216;,&#8217;&lt;/b&gt;);      ERROR- ERROR-</p><p>llevo ya un buen rato y no se como hacerlo, alguien que me ayude</p> ]]></content:encoded> </item> <item><title>Por: seba64</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-5/#comment-49200</link> <dc:creator>seba64</dc:creator> <pubDate>Sat, 08 May 2010 16:25:55 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-49200</guid> <description>y si yo quiero hacer el siguiente reemplazo para Todas las ocurrencias, como dice David
[negrita] =&gt; &lt;b&gt;
[/negrita] =&gt; &lt;/b&gt;
texto=texto.replace(&#039;[negrita]&#039;,&#039;&lt;b&gt;&#039;);        ERROR- ERROR-
texto=texto.replace(&#039;[/negrita]&#039;,&#039;&lt;/b&gt;);      ERROR- ERROR-
llevo ya un buen rato y no se como hacerlo, alguien que me ayude</description> <content:encoded><![CDATA[<p>y si yo quiero hacer el siguiente reemplazo para Todas las ocurrencias, como dice David</p><p> [negrita] =&gt; <b><br
/> [/negrita] =&gt; </b></p><p> texto=texto.replace(&#8216;[negrita]&#8216;,&#8217;<b>&#8216;);        ERROR- ERROR-<br
/> texto=texto.replace(&#8216;[/negrita]&#8216;,&#8217;</b>);      ERROR- ERROR-</p><p>llevo ya un buen rato y no se como hacerlo, alguien que me ayude</p> ]]></content:encoded> </item> <item><title>Por: David</title><link>http://lineadecodigo.com/javascript/funcion-replace-en-javascript/comment-page-5/#comment-48863</link> <dc:creator>David</dc:creator> <pubDate>Tue, 23 Feb 2010 14:08:56 +0000</pubDate> <guid
isPermaLink="false">http://lineadecodigo.com/2007/08/07/funcion-replace-en-javascript/#comment-48863</guid> <description>&quot;David Martín&quot; anda un poco perdido en su comentario anterior.
Para sustituir TODAS las ocurrencias de &#039;str1&#039;, por &#039;str2&#039;, en la cadena &#039;strTotal&#039;, no hay que usar ninguna función distinta, sino, como bien explica el autor de este blog, hacer como sigue:
&#039;strTotal&#039;.replace(/str2/gi,&#039;str1&#039;);</description> <content:encoded><![CDATA[<p>&#8220;David Martín&#8221; anda un poco perdido en su comentario anterior.<br
/> Para sustituir TODAS las ocurrencias de &#8216;str1&#8242;, por &#8216;str2&#8242;, en la cadena &#8216;strTotal&#8217;, no hay que usar ninguna función distinta, sino, como bien explica el autor de este blog, hacer como sigue:</p><p>&#8216;strTotal&#8217;.replace(/str2/gi,&#8217;str1&#8242;);</p> ]]></content:encoded> </item> </channel> </rss>
