<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Programador ASP &#187; Programación</title>
	<atom:link href="http://programadorasp.com/category/programacion/feed/" rel="self" type="application/rss+xml" />
	<link>http://programadorasp.com</link>
	<description>Programación en Internet</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:09:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</title>
		<link>http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/</link>
		<comments>http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 19:10:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Buscadores]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[acentos]]></category>
		<category><![CDATA[ansi]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[cadena de texto]]></category>
		<category><![CDATA[carácteres extraños]]></category>
		<category><![CDATA[comillas]]></category>
		<category><![CDATA[expresiones regulares]]></category>
		<category><![CDATA[iso-8859-1]]></category>
		<category><![CDATA[patrón expresión regular]]></category>
		<category><![CDATA[Pattern]]></category>
		<category><![CDATA[permalinks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[reemplazar carácteres]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[tildes]]></category>
		<category><![CDATA[URL friendly]]></category>
		<category><![CDATA[URL's amigables]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://programadorasp.com/?p=503</guid>
		<description><![CDATA[Las expresiones regulares en ASP son muy útiles para reemplazar carácteres extraños en cadenas de texto y quitar acentos para por ejemplo generar url's amigables
Related posts:<ol>
<li><a href='http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/' rel='bookmark' title='Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL'>Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL</a></li>
<li><a href='http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/' rel='bookmark' title='La World Wide Web y el HTML cumplen 20 años'>La World Wide Web y el HTML cumplen 20 años</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En ocasiones en <strong>ASP</strong> hemos querido <strong>reemplazar carácteres</strong> de un texto o una cadena para eliminar los acentos y los carácteres extraños como paréntesis, puntos, comas, corchetes, ñ, ç,&#8230; Por ejemplo, para generar <strong>URL&#8217;s amigables</strong> para los buscadores (URL friendly o permalinks), necesitamos convertir las cadenas a texto plano <strong>sin carácteres extraños</strong>. Podemos hacer funciones de reemplazo de carácteres intentando tener en cuenta todos los carácteres extraños que nos podamos encontrar en una cadena, pero las <strong>expresiones regulares</strong> y sus herramientas de reemplazo nos pueden ayudar mucho. Se trata de utilizar el operador <strong>.replace</strong> del objeto de expresión regular en ASP, jugando con los <strong>patrones</strong> para las condiciones.</p>
<p>En la funcion siguiente, a partir de una <strong>cadena de texto</strong> dada se convierte a una cadena amigable para los buscadores, eliminando los carácteres extraños. En primer lugar, se eliminan los espacios a ambos lados de la cadena y se reemplazan o eliminan los carácteres que pueden dar problemas en bases de datos como las <strong>comillas</strong> simples y dobles, saltos de línea y espacios. Después se usan las <strong>expresiones regulares</strong> para eliminar de las vocales las tildes abiertas y cerradas, diéresis,&#8230; y para sustituir la ñ y la ç por n y c respectivamente. Es decir, los carácteres que <strong>cumplan el patrón</strong> de la expresión regular serán sustituidos por el carácter dado. Por último, se eliminan los carácteres restantes que <strong>no cumplan el patrón</strong> de URL amigable (letras minúsculas, números y guión).</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">function</span> convertirAURLfriendly<span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">if</span> <span style="color: #990099; font-weight: bold;">not</span> isNull<span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #990099; font-weight: bold;">then</span>
    <span style="color: #008000;">' Eliminamos los espacios a ambos lados de la cadena</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">Trim</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">lCase</span><span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    <span style="color: #008000;">' Reemplazamos carácteres especiales</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">replace</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena,<span style="color: #cc0000;">&quot;'&quot;</span>,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #cc0000;">&quot;&quot;</span>,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">replace</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena,<span style="color: #cc0000;">&quot;&amp;quot;&quot;</span>,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>,vbcrlf,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">replace</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena,<span style="color: #cc0000;">&quot;&lt;br&gt;&quot;</span>,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>,<span style="color: #cc0000;">&quot; &quot;</span>,<span style="color: #cc0000;">&quot;-&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    <span style="color: #990099; font-weight: bold;">set</span> expReg <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">New</span> RegExp
    <span style="color: #008000;">' Todas las ocurrencias</span>
    expReg.<span style="color: #990099; font-weight: bold;">Global</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">True</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[àáâãäå]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;a&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[èéêë]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;e&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[ìíîï]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;i&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[òóôõö]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;o&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[ùúûü]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;u&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[ñ]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;n&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[ç]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;c&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    <span style="color: #008000;">' Todo lo que no cumpla este patron</span>
    expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;[^a-z0-9-]&quot;</span>
    strCadena <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #330066;">Replace</span><span style="color: #006600; font-weight:bold;">&#40;</span>strCadena, <span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
    <span style="color: #990099; font-weight: bold;">set</span> expReg <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">nothing</span>
    convertirAURLfriendly <span style="color: #006600; font-weight: bold;">=</span> left<span style="color: #006600; font-weight:bold;">&#40;</span>strCadena,<span style="color: #800000;">256</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">else</span>
    convertirAURLfriendly <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;&quot;</span>
  <span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">function</span></pre></div></div>

<p>Hacer la conversión de la función anterior a otros lenguajes como <strong>PHP</strong> o <strong>Javascript</strong> es relativamente sencillo, en otros artículos de este blog se pueden encontrar ejemplos de expresiones regulares en Javascript. De hecho, la función anterior an ASP para generar URL&#8217;s amigables me funcionaba en archivos ANSI con codificación iso-8859-1, pero da problemas con los acentos y carácteres extraños cuando el archivo está en <strong>UTF-8</strong>. Así que después de darle muchas vueltas, convertí la función de ASP a Javascript y la llamaba antes de enviar el formulario, es decir generaba la <strong>URL amigable</strong> desde Javascript y lo almacenaba en una variable hidden que también envío con el formulario. La función en <strong>Javascript</strong> que funciona para UTF-8:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> convertirAURLfriendly<span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  strCadena <span style="color: #339933;">=</span> str<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>strCadena<span style="color: #339933;">!=</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">// Elimina espacios al principio y al final</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^\s*|\s*$/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&amp;quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;_&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[àáâãäå]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[èéêë]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'e'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[ìíîï]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'i'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[òóôõö]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'o'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[ùúûü]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'u'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[ñ]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'n'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[ç]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">'c'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">// Todo lo que no cumpla este patron</span>
    strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[^a-z0-9-]/gi</span><span style="color: #339933;">;</span>
    strCadena <span style="color: #339933;">=</span> strCadena.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>strExpReg<span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> strCadena.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Related posts:<ol>
<li><a href='http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/' rel='bookmark' title='Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL'>Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL</a></li>
<li><a href='http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/' rel='bookmark' title='La World Wide Web y el HTML cumplen 20 años'>La World Wide Web y el HTML cumplen 20 años</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL</title>
		<link>http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/</link>
		<comments>http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 20:34:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[base de datos]]></category>
		<category><![CDATA[carácteres especiales]]></category>
		<category><![CDATA[charset utf-8]]></category>
		<category><![CDATA[CodePage 65001]]></category>
		<category><![CDATA[editor avanzado]]></category>
		<category><![CDATA[encoding UTF-8]]></category>
		<category><![CDATA[formato UTF-8]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql_query]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[problemas de codificación]]></category>
		<category><![CDATA[programación web]]></category>
		<category><![CDATA[pspad]]></category>
		<category><![CDATA[SET NAMES UTF8]]></category>
		<category><![CDATA[solución]]></category>
		<category><![CDATA[text/xml]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=443</guid>
		<description><![CDATA[Solución al problema de que los carácteres especiales no se muestran bien en un XML devuelto en PHP leyendo de base de datos MySQL con codificación UTF-8.
Related posts:<ol>
<li><a href='http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/' rel='bookmark' title='La World Wide Web y el HTML cumplen 20 años'>La World Wide Web y el HTML cumplen 20 años</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
<li><a href='http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/' rel='bookmark' title='Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables'>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En muchas ocasiones he programado en lenguaje <strong>ASP</strong> páginas que devuelven datos en <strong>XML</strong> leyéndolos de una base de datos <strong>MySQL</strong>. Con el fin de que los datos almacenados en MySQL salgan con el formato correcto, lo mejor es trabajar en <strong>UTF-8</strong>. Para ello, es necesario guardar el archivo ASP que devuelve el XML en <strong>formato UTF-8</strong> desde un editor avanzado gratuito como el <strong><a href="http://programadorasp.com/pspad-potente-editor-de-textos-gratuito-y-en-espanol/" target="_blank">PSPad</a></strong>. Además, hay que poner el siguiente código ASP antes que nada:</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #9900cc;">CodePage</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;65001&quot;</span>     <span style="color: #008000;">' Comentario: UTF-8</span>
<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;?xml version=&quot;</span><span style="color: #cc0000;">&quot;1.0&quot;</span><span style="color: #cc0000;">&quot; encoding=&quot;</span><span style="color: #cc0000;">&quot;UTF-8&quot;</span><span style="color: #cc0000;">&quot;?&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Pero cuando intentamos hacer lo mismo en lenguaje <strong>PHP</strong> podemos tener el problema de que los <strong>carácteres especiales</strong> no se muestran bien en pantalla. Haciendo lo mismo que con el ASP, guardando el archivo PHP que devuelve el XML en <strong>formato UTF-8</strong> desde el editor avanzado y poniendo el siguiente código pueden haber problemas:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">header(&quot;Content-type:text/xml; charset=utf-8&quot;);
echo &quot;<span style="color: #000000; font-weight: bold;">&lt;?</span>xml version<span style="color: #339933;">=</span>\<span style="color: #0000ff;">&quot;1.0<span style="color: #000099; font-weight: bold;">\&quot;</span> encoding=<span style="color: #000099; font-weight: bold;">\&quot;</span>utf-8<span style="color: #000099; font-weight: bold;">\&quot;</span> ?&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Según me comentó un colega también <a href="http://www.programadorphp.es/" target="_blank">programador web</a>, parece que la comunicación con la <strong>base de datos MySQL</strong> no se está realizando en <strong>UTF-8</strong>. Para que se realice correctamente, hay que lanzar esta instrucción MySQL antes que nada:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql_query<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SET NAMES UTF8&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Con esto se solucionan los <strong>problemas de codificación</strong> y los carácteres especiales se muestran bien en la web.</p>
<p>Related posts:<ol>
<li><a href='http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/' rel='bookmark' title='La World Wide Web y el HTML cumplen 20 años'>La World Wide Web y el HTML cumplen 20 años</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
<li><a href='http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/' rel='bookmark' title='Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables'>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Problemas y soluciones al instalar PHP para IIS en Windows</title>
		<link>http://programadorasp.com/problemas-y-soluciones-al-instalar-php-para-iis-en-windows/</link>
		<comments>http://programadorasp.com/problemas-y-soluciones-al-instalar-php-para-iis-en-windows/#comments</comments>
		<pubDate>Mon, 11 May 2009 12:26:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[Sistemas]]></category>
		<category><![CDATA[extensión mysql]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=257</guid>
		<description><![CDATA[A la hora de instalar PHP en Windows para funcionar sobre el servidor web IIS podemos encontrarnos con algunos problemas. Dejo aquí una recopilación de pasos básicos que recomiendo al instalar PHP en Windows si encontramos alguno de estos problemas. Al menos está comprobado que funciona hasta la versión de php 5.2.9: 1.- Descargar el [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/solucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql/' rel='bookmark' title='Solución al problema al instalar WordPress: instalación de PHP no cuenta con la extensión de MySQL'>Solución al problema al instalar WordPress: instalación de PHP no cuenta con la extensión de MySQL</a></li>
<li><a href='http://programadorasp.com/errores-al-subir-imagenes-en-wordpress/' rel='bookmark' title='Errores al subir imágenes en WordPress'>Errores al subir imágenes en WordPress</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A la hora de instalar PHP en Windows para funcionar sobre el servidor web IIS podemos encontrarnos con algunos problemas. Dejo aquí una recopilación de pasos básicos que recomiendo al instalar PHP en Windows si encontramos alguno de estos problemas. Al menos está comprobado que <strong>funciona hasta la versión de php 5.2.9</strong>:</p>
<p>1.- Descargar el archivo comprimido en <strong>zip</strong> de <a href="http://php.net" target="_blank">http://php.net</a>.<br />
2.- Descomprimirlo en la carpeta <strong>c:\php5</strong>, por ejemplo.<br />
3.- En IIS, en Equipo Local / Sitios web / Propiedades / pestaña Directorio particular / Configuración, dar de alta la asignación <strong>.php</strong> con <strong>c:\php5\php5isapi.dll</strong>.<br />
4.- En IIS, en Equipo Local / Sitios web / Propiedades / pestaña Documentos / Habilitar documento predeterminado, agregar <strong>index.htm</strong> e <strong>index.php</strong>, que suelen ser los documentos por defecto en webs que usan Apache y PHP.<br />
5.- En <strong>c:\php5</strong>, hacer una copia del archivo <strong>php.ini-recommended</strong> y renombrarlo a <strong>php.ini</strong>.<br />
6.- Modificar en el <strong>php.ini</strong> anterior:<br />
- De <strong>;cgi.force_redirect = 1</strong> a <strong>cgi.force_redirect = 0</strong> (descomentar y poner a 0).<br />
- <strong>extension_dir = &#8220;c:\php5\ext\&#8221;</strong>.<br />
- descomentar <strong>extension=php_mysql.dll</strong> para que funcione mysql.<br />
- descomentar <strong>extension=php_mbstring.dll</strong> y <strong>extension=php_mcrypt.dll</strong> para que no dé error el <strong>PhpMyAdmin</strong>, por ejemplo (al menos la <strong>versión 3.2.3.0</strong>).<br />
7.- Copiar el archivo  <strong>php.ini</strong> modificado a <strong>c:\windows</strong>.<br />
8.- ver en <a href="http://www.php.net/manual/en/install.windows.extensions.php" target="_blank">http://www.php.net/manual/en/install.windows.extensions.php</a> las dependencias de cada extensión, por ejemplo <strong>php_mysql.dll PHP &gt;= 5.0.0, requires libmysql.dll (bundled)</strong> y copiarlas en <strong>c:\Windows\System32</strong> (en este caso <strong>libmysql.dll</strong>). Para <strong>php_mcrypt.dll, Requires: libmcrypt.dll</strong>, copiar <strong>libmcrypt.dll</strong> a <strong>c:\Windows\System32</strong>.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;count=horizontal&amp;text=Problemas%20y%20soluciones%20al%20instalar%20PHP%20para%20IIS%20en%20Windows" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;count=horizontal&amp;text=Problemas%20y%20soluciones%20al%20instalar%20PHP%20para%20IIS%20en%20Windows" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fproblemas-y-soluciones-al-instalar-php-para-iis-en-windows%2F&amp;title=Problemas%20y%20soluciones%20al%20instalar%20PHP%20para%20IIS%20en%20Windows" id="wpa2a_2">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/solucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql/' rel='bookmark' title='Solución al problema al instalar WordPress: instalación de PHP no cuenta con la extensión de MySQL'>Solución al problema al instalar WordPress: instalación de PHP no cuenta con la extensión de MySQL</a></li>
<li><a href='http://programadorasp.com/errores-al-subir-imagenes-en-wordpress/' rel='bookmark' title='Errores al subir imágenes en WordPress'>Errores al subir imágenes en WordPress</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/problemas-y-soluciones-al-instalar-php-para-iis-en-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Solución al problema al instalar WordPress: instalación de PHP no cuenta con la extensión de MySQL</title>
		<link>http://programadorasp.com/solucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql/</link>
		<comments>http://programadorasp.com/solucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 18:14:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[extensión mysql]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=247</guid>
		<description><![CDATA[En una ocasión, instalando un servidor web con sistema operativo Linux Debian y soporte para PHP y MySQL, me encontré al instalar WordPress para un blog con el problema &#8220;Parece que tu instalación de PHP no cuenta con la extensión de MySQL, necesaria para WordPress&#8221;. La solución al problema es descomentar una línea del archivo [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/problemas-y-soluciones-al-instalar-php-para-iis-en-windows/' rel='bookmark' title='Problemas y soluciones al instalar PHP para IIS en Windows'>Problemas y soluciones al instalar PHP para IIS en Windows</a></li>
<li><a href='http://programadorasp.com/errores-al-subir-imagenes-en-wordpress/' rel='bookmark' title='Errores al subir imágenes en WordPress'>Errores al subir imágenes en WordPress</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En una ocasión, instalando un servidor web con sistema operativo Linux Debian y soporte para PHP y MySQL, me encontré al instalar WordPress para un blog con el problema &#8220;Parece que tu instalación de PHP no cuenta con la extensión de MySQL, necesaria para WordPress&#8221;. La solución al problema es descomentar una línea del archivo php.ini, como especifica <a href="http://patob2000.wordpress.com/2007/04/21/instalar-apache-mysql-y-php5-en-debian/" target="_blank">Patob en su blog</a>. Hay que descomentar en el php.ini, generalmente en /etc/php5/apache2/php.ini (eliminar el punto y coma ; de delante) la línea:</p>
<pre>;extension=mysql.so</pre>
<p>con esto PHP carga la extensión para MySQL automáticamente. Por último reiniciamos Apache y MySQL:</p>
<pre>#/etc/init.d/apache restart
#/etc/init.d/mysql restart</pre>
<p>y este problema debería solucionarse.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;count=horizontal&amp;text=Soluci%C3%B3n%20al%20problema%20al%20instalar%20WordPress%3A%20instalaci%C3%B3n%20de%20PHP%20no%20cuenta%20con%20la%20extensi%C3%B3n%20de%20MySQL" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;count=horizontal&amp;text=Soluci%C3%B3n%20al%20problema%20al%20instalar%20WordPress%3A%20instalaci%C3%B3n%20de%20PHP%20no%20cuenta%20con%20la%20extensi%C3%B3n%20de%20MySQL" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fsolucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql%2F&amp;title=Soluci%C3%B3n%20al%20problema%20al%20instalar%20WordPress%3A%20instalaci%C3%B3n%20de%20PHP%20no%20cuenta%20con%20la%20extensi%C3%B3n%20de%20MySQL" id="wpa2a_4">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/problemas-y-soluciones-al-instalar-php-para-iis-en-windows/' rel='bookmark' title='Problemas y soluciones al instalar PHP para IIS en Windows'>Problemas y soluciones al instalar PHP para IIS en Windows</a></li>
<li><a href='http://programadorasp.com/errores-al-subir-imagenes-en-wordpress/' rel='bookmark' title='Errores al subir imágenes en WordPress'>Errores al subir imágenes en WordPress</a></li>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/solucion-al-problema-al-instalar-wordpress-instalacion-de-php-no-cuenta-con-la-extension-de-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La World Wide Web y el HTML cumplen 20 años</title>
		<link>http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/</link>
		<comments>http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 11:32:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[20 aniversario]]></category>
		<category><![CDATA[20 años]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[CERN]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[navegador]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[servidor web]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=245</guid>
		<description><![CDATA[Hoy viernes 13 de marzo se cumplen 20 años del nacimiento de las páginas web (WWW), tal como las conocemos. El 13 de marzo de 1989 una propuesta presentada por un físico del CERN (Centro Europeo de Investigaciones Nucleares) sentó las bases para desarrollar el lenguaje HTML, que en principio serviría para intercambiar información entre [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
<li><a href='http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/' rel='bookmark' title='Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL'>Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL</a></li>
<li><a href='http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/' rel='bookmark' title='Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables'>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="alignnone size-full wp-image-159" title="www_world_wide_web" src="http://tecnologiadelavida.com/files/2009/03/www_world_wide_web.jpg" alt="" width="500" height="65" /></p>
<p>Hoy viernes 13 de marzo se cumplen 20 años del nacimiento de las páginas web (<a href="http://es.wikipedia.org/wiki/World_Wide_Web" target="_blank">WWW</a>), tal como las conocemos. El 13 de marzo de 1989 una propuesta presentada por un físico del <a href="http://www.cern.ch" target="_blank">CERN</a> (<a href="http://es.wikipedia.org/wiki/CERN" target="_blank">Centro Europeo de Investigaciones Nucleares</a>) sentó las bases para desarrollar el lenguaje <a href="http://es.wikipedia.org/wiki/Html" target="_blank">HTML</a>, que en principio serviría para intercambiar información entre físicos de todo el mundo a través de Internet. El lenguaje HTML (HyperText Markup Language) es un lenguaje de etiquetas que permite establecer hipervínculos entre documentos de forma fácil y que los navegadores saben interpretar. Tiempo después vendrían nuevas tecnologías y lenguajes como javascript, flash, asp, php,&#8230;</p>
<div id="attachment_160" class="wp-caption aligncenter" style="width: 389px"><img class="size-full wp-image-160" title="www_primer_servidor_web" src="http://tecnologiadelavida.com/files/2009/03/www_primer_servidor_web.jpg" alt="El creador de la WWW, Tim Berners-Lee junto al ordenador que sirvió de primer servidor web" width="379" height="259" /><p class="wp-caption-text">El creador de la WWW, Tim Berners-Lee, junto al ordenador que sirvió de primer servidor web</p></div>
<p>Pocos se imaginaban que aquel invento iba a revolucionar la tecnología y en el CERN <a href="http://info.cern.ch/www20/" target="_blank">lo están celebrando</a> dando conferencias, haciendo camisetas y exponiendo el primer ordenador que albergó un servidor web, un navegador web y un editor para desarrollar páginas web.</p>
<div id="attachment_161" class="wp-caption aligncenter" style="width: 285px"><img class="size-full wp-image-161" title="www_html" src="http://tecnologiadelavida.com/files/2009/03/www_html.jpg" alt="Ejemplo de documento en lenguaje HTML" width="275" height="313" /><p class="wp-caption-text">Ejemplo de documento en lenguaje HTML</p></div>
<p>Recuerdo mi primer contacto con la web en la Universidad Politécnica de Valencia (España), cuando inicié (y años después acabé) la carrera de Ingeniería Técnica en Informática de Sistemas, allá por el año 1994. En 1995-96 colaboré en el desarrollo de una página web de una asociación de la Universidad y desde la Facultad de Informática programábamos las páginas web con un editor de textos y editor de imágenes básicos&#8230; Escribía el lenguaje HTML totalmente a mano, qué recuerdos, &lt;html&gt;&lt;head&gt;&lt;title&gt;&#8230; &lt;table border=&#8221;0&#8243;&#8230; Empezando de esta forma me ha servido mucho posteriormente, es mucho más fácil encontrar errores y problemas cuando se conoce el código.</p>
<p>Este artículo en una versión menos técnica también lo podéis encontrar en <a href="http://tecnologiadelavida.com/la-web-cumple-20-anos/" target="_blank">Tecnología de la Vida</a>.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;count=horizontal&amp;text=La%20World%20Wide%20Web%20y%20el%20HTML%20cumplen%2020%20a%C3%B1os" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;count=horizontal&amp;text=La%20World%20Wide%20Web%20y%20el%20HTML%20cumplen%2020%20a%C3%B1os" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fla-world-wide-web-y-el-html-cumplen-20-anos%2F&amp;title=La%20World%20Wide%20Web%20y%20el%20HTML%20cumplen%2020%20a%C3%B1os" id="wpa2a_6">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/convertir-archivos-web-estaticos-dinamicos-introducir-codigo/' rel='bookmark' title='Interpretar páginas web estáticas como php, asp o cualquier lenguaje'>Interpretar páginas web estáticas como php, asp o cualquier lenguaje</a></li>
<li><a href='http://programadorasp.com/codificacion-utf-8-incorrecta-php-leyendo-base-datos-mysql/' rel='bookmark' title='Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL'>Codificación UTF-8 incorrecta en PHP leyendo una base de datos MySQL</a></li>
<li><a href='http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/' rel='bookmark' title='Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables'>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Modificar el contenido de cualquier página web cargada en local con Javascript</title>
		<link>http://programadorasp.com/modificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript/</link>
		<comments>http://programadorasp.com/modificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 21:04:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[truco]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=173</guid>
		<description><![CDATA[Me han enviado un correo con un truco curioso, obtenido de una traducción del artículo original de Phil Benwell. Se trata de un pequeño código en Javascript para modificar el contenido de cualquier página web que se esté visualizando. Evidentemente sólo funciona en local con las webs que tengamos cargadas en el navegador, pero podemos [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/eliminar-saltos-de-linea-en-un-textarea-con-javascript/' rel='bookmark' title='Eliminar saltos de línea en un textarea con Javascript'>Eliminar saltos de línea en un textarea con Javascript</a></li>
<li><a href='http://programadorasp.com/generar-password-y-contrasenas-aleatorias-con-javascript/' rel='bookmark' title='Generar password y contraseñas aleatorias con javascript'>Generar password y contraseñas aleatorias con javascript</a></li>
<li><a href='http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/' rel='bookmark' title='La World Wide Web y el HTML cumplen 20 años'>La World Wide Web y el HTML cumplen 20 años</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Me han enviado un correo con un truco curioso, obtenido de una traducción del artículo original de <a href="http://www.philbenwell.co.uk/blog/browser-hack-make-any-web-page-editable" target="_blank">Phil Benwell</a>.</p>
<p>Se trata de un pequeño código en Javascript para modificar el contenido de cualquier página web que se esté visualizando. Evidentemente sólo funciona en local con las webs que tengamos cargadas en el navegador, pero podemos vacilar un poco delante de los amigos modificando la cifra de ganancias en AdSense o apareciendo en la primera página de algún periódico online.</p>
<p>Para ello, cuando estemos visualizando la web que queremos modificar, pegamos el siguiente código en la barra de direcciones del navegador:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">javascript<span style="color: #339933;">:</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">contentEditable</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'true'</span><span style="color: #339933;">;</span>
document.<span style="color: #660066;">designMode</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'on'</span><span style="color: #339933;">;</span> <span style="color: #000066; font-weight: bold;">void</span> <span style="color: #CC0000;">0</span></pre></div></div>

<p>y pulsamos Intro, con lo que podremos editar cualquier parte de la página web: eliminar contenido, añadir imágenes, modificar texto,&#8230;</p>
<p>Como ya he dicho, estas modificaciones sólo actúan a nivel de nuestro ordenador local, con lo que no estamos modificando nada en Internet.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;count=horizontal&amp;text=Modificar%20el%20contenido%20de%20cualquier%20p%C3%A1gina%20web%20cargada%20en%20local%20con%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;count=horizontal&amp;text=Modificar%20el%20contenido%20de%20cualquier%20p%C3%A1gina%20web%20cargada%20en%20local%20con%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fmodificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript%2F&amp;title=Modificar%20el%20contenido%20de%20cualquier%20p%C3%A1gina%20web%20cargada%20en%20local%20con%20Javascript" id="wpa2a_8">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/eliminar-saltos-de-linea-en-un-textarea-con-javascript/' rel='bookmark' title='Eliminar saltos de línea en un textarea con Javascript'>Eliminar saltos de línea en un textarea con Javascript</a></li>
<li><a href='http://programadorasp.com/generar-password-y-contrasenas-aleatorias-con-javascript/' rel='bookmark' title='Generar password y contraseñas aleatorias con javascript'>Generar password y contraseñas aleatorias con javascript</a></li>
<li><a href='http://programadorasp.com/la-world-wide-web-y-el-html-cumplen-20-anos/' rel='bookmark' title='La World Wide Web y el HTML cumplen 20 años'>La World Wide Web y el HTML cumplen 20 años</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/modificar-el-contenido-de-cualquier-pagina-web-cargada-en-local-con-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eliminar saltos de línea en un textarea con Javascript</title>
		<link>http://programadorasp.com/eliminar-saltos-de-linea-en-un-textarea-con-javascript/</link>
		<comments>http://programadorasp.com/eliminar-saltos-de-linea-en-un-textarea-con-javascript/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 14:11:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[expresiones regulares]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[saltos línea]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=168</guid>
		<description><![CDATA[Alguna vez he tenido la necesidad de eliminar los saltos de línea en un campo de formulario de tipo textarea. Más aún, he tenido la necesidad de eliminar los saltos de línea del texto seleccionado dentro de un textarea. Con la siguiente función Javascript conseguimos localizar la porción de texto seleccionado y eliminar los saltos [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/' rel='bookmark' title='Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables'>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</a></li>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/' rel='bookmark' title='Validar fechas con expresiones regulares en ASP y Javascript'>Validar fechas con expresiones regulares en ASP y Javascript</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>    Alguna vez he tenido la necesidad de eliminar los saltos de línea en un campo de formulario de tipo textarea. Más aún, he tenido la necesidad de eliminar los saltos de línea del texto seleccionado dentro de un textarea. Con la siguiente función Javascript conseguimos localizar la porción de texto seleccionado y eliminar los saltos de línea o line breaks (&#8220;\n&#8221;) y los retornos de carro o carrier return (&#8220;\r&#8221;). Para ello utilizamos funciones propias del lenguaje Javascript (createTextRange, duplicate, replace) y expresiones regulares.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> suprSaltos<span style="color: #009900;">&#40;</span>campo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>campo.<span style="color: #660066;">createTextRange</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  campo.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span>campo.<span style="color: #660066;">caretPos</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  campo.<span style="color: #660066;">caretPos</span> <span style="color: #339933;">=</span> document.<span style="color: #660066;">selection</span>.<span style="color: #660066;">createRange</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">duplicate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>campo.<span style="color: #660066;">caretPos</span>.<span style="color: #660066;">text</span>.<span style="color: #660066;">length</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> sel <span style="color: #339933;">=</span> campo.<span style="color: #660066;">caretPos</span>.<span style="color: #660066;">text</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> fin <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>sel.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span>sel.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> sel.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #3366CC;">' '</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    sel <span style="color: #339933;">=</span> sel.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> sel.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fin <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' '</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
   campo.<span style="color: #660066;">caretPos</span>.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> sel.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\\</span>n'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'g'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span>. _
                          replace<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\\</span>r'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'g'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> fin<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> campo.<span style="color: #660066;">caretPos</span>.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000066; font-weight: bold;">else</span> campo.<span style="color: #660066;">value</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Como en otras funciones, en esta función es necesario juntar la expresión en una única línea quitando los _ de final de línea porque de lo contrario no funcionará.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;count=horizontal&amp;text=Eliminar%20saltos%20de%20l%C3%ADnea%20en%20un%20textarea%20con%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;count=horizontal&amp;text=Eliminar%20saltos%20de%20l%C3%ADnea%20en%20un%20textarea%20con%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Feliminar-saltos-de-linea-en-un-textarea-con-javascript%2F&amp;title=Eliminar%20saltos%20de%20l%C3%ADnea%20en%20un%20textarea%20con%20Javascript" id="wpa2a_10">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/generar-urls-amigables-asp-expresiones-regulares/' rel='bookmark' title='Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables'>Reemplazar carácteres con expresiones regulares en ASP para generar URL&#8217;s amigables</a></li>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/' rel='bookmark' title='Validar fechas con expresiones regulares en ASP y Javascript'>Validar fechas con expresiones regulares en ASP y Javascript</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/eliminar-saltos-de-linea-en-un-textarea-con-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript</title>
		<link>http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/</link>
		<comments>http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 14:15:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[expresiones regulares]]></category>
		<category><![CDATA[validar campos]]></category>
		<category><![CDATA[validar URL]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=125</guid>
		<description><![CDATA[Para validar direcciones de Internet simples (URL&#8217;s) de usuarios que introducen su página web en un campo de formulario podemos utilizar la siguiente función en Javascript: function ValidarUrl&#40;txtCampo&#41; strExpReg = /^http:\/\/[a-zA-Z0-9-_:/.?&#38;amp;=&#93;+$/; if &#40;!strExpReg.test&#40;txtCampoActual.value&#41;&#41;&#123; strMensaje = 'La página web no es válida,\ncontiene carácteres '; strMensaje += 'no válidos o no empieza por &#34;http://&#34;'; alert&#40;strMensaje&#41;; txtCampoActual.focus&#40;&#41;; return [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/' rel='bookmark' title='Validar fechas con expresiones regulares en ASP y Javascript'>Validar fechas con expresiones regulares en ASP y Javascript</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/' rel='bookmark' title='Validar direcciones de e-mail con expresiones regulares en ASP y Javascript'>Validar direcciones de e-mail con expresiones regulares en ASP y Javascript</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Para validar direcciones de Internet simples (URL&#8217;s) de usuarios que introducen su página web en un campo de formulario podemos utilizar la siguiente función en Javascript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> ValidarUrl<span style="color: #009900;">&#40;</span>txtCampo<span style="color: #009900;">&#41;</span>
  strExpReg <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^http:\/\/[a-zA-Z0-9-_:/</span>.<span style="color: #339933;">?&amp;</span>amp<span style="color: #339933;">;=</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span>$<span style="color: #339933;">/;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>strExpReg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>txtCampoActual.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    strMensaje <span style="color: #339933;">=</span> <span style="color: #3366CC;">'La página web no es válida,<span style="color: #000099; font-weight: bold;">\n</span>contiene carácteres '</span><span style="color: #339933;">;</span>
    strMensaje <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'no válidos o no empieza por &quot;http://&quot;'</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>strMensaje<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    txtCampoActual.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
end <span style="color: #003366; font-weight: bold;">function</span></pre></div></div>

<p>En este caso, la validación se realiza del lado del cliente (al ser Javascript) y la función recibe como parámetro el campo del formulario donde irá la URL, mostrando un mensaje de error si la URL no es válida y devolviendo el foco a ese campo.</p>
<p>Obtener su versión en ASP y otros lenguajes es fácil adaptando la expresión regular a la sintaxis de cada lenguaje</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;count=horizontal&amp;text=Validar%20direcciones%20de%20Internet%20o%20URL%26%238217%3Bs%20con%20expresiones%20regulares%20en%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;count=horizontal&amp;text=Validar%20direcciones%20de%20Internet%20o%20URL%26%238217%3Bs%20con%20expresiones%20regulares%20en%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript%2F&amp;title=Validar%20direcciones%20de%20Internet%20o%20URL%26%238217%3Bs%20con%20expresiones%20regulares%20en%20Javascript" id="wpa2a_12">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/' rel='bookmark' title='Validar fechas con expresiones regulares en ASP y Javascript'>Validar fechas con expresiones regulares en ASP y Javascript</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/' rel='bookmark' title='Validar direcciones de e-mail con expresiones regulares en ASP y Javascript'>Validar direcciones de e-mail con expresiones regulares en ASP y Javascript</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Validar direcciones de e-mail con expresiones regulares en ASP y Javascript</title>
		<link>http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/</link>
		<comments>http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 14:30:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[expresiones regulares]]></category>
		<category><![CDATA[validar campos]]></category>
		<category><![CDATA[validar e-mail]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=118</guid>
		<description><![CDATA[Para validar direcciones de e-mail podemos utilizar la siguiente función en ASP: function esValidoEmail&#40;cadena&#41; set expReg = New RegExp expReg.Pattern = &#34;^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@_ [_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*$&#34; esValidoEmail = expReg.Test&#40;cadena&#41; and len&#40;cadena&#41; &#38;lt; 256 set expReg = nothing end function Su versión en Javascript: function esValidoEmail&#40;cadena&#41; &#123; strExpReg = /^&#91;_a-zA-Z0-9-&#93;+&#40;\.&#91;_a-zA-Z0-9-&#93;+&#41;*@_ &#91;_a-zA-Z0-9-&#93;+&#40;\.&#91;a-zA-Z0-9-&#93;+&#41;*$/; return strExpReg.test&#40;cadena&#41;; &#125; Como en las otras funciones, [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/' rel='bookmark' title='Validar fechas con expresiones regulares en ASP y Javascript'>Validar fechas con expresiones regulares en ASP y Javascript</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/' rel='bookmark' title='Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript'>Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Para validar direcciones de e-mail podemos utilizar la siguiente función en ASP:</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">function</span> esValidoEmail<span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">set</span> expReg <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">New</span> RegExp
  expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@_
                     [_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*$&quot;</span>
  esValidoEmail <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #9900cc;">Test</span><span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #0000ff; font-weight: bold;">and</span> <span style="color: #330066;">len</span><span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span>lt<span style="color: #006600; font-weight: bold;">;</span> <span style="color: #800000;">256</span>
  <span style="color: #990099; font-weight: bold;">set</span> expReg <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">nothing</span>
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">function</span></pre></div></div>

<p>Su versión en Javascript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> esValidoEmail<span style="color: #009900;">&#40;</span>cadena<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  strExpReg <span style="color: #339933;">=</span> <span style="color: #339933;">/^</span><span style="color: #009900;">&#91;</span>_a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>\.<span style="color: #009900;">&#91;</span>_a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*@</span>_
                <span style="color: #009900;">&#91;</span>_a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>\.<span style="color: #009900;">&#91;</span>a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>$<span style="color: #339933;">/;</span>
  <span style="color: #000066; font-weight: bold;">return</span> strExpReg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>cadena<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Como en las otras funciones, en esta función en Javascript sí que es necesario juntar la expresión en una única línea quitando los _ de final de línea porque de lo contrario no funcionará.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;count=horizontal&amp;text=Validar%20direcciones%20de%20e-mail%20con%20expresiones%20regulares%20en%20ASP%20y%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;count=horizontal&amp;text=Validar%20direcciones%20de%20e-mail%20con%20expresiones%20regulares%20en%20ASP%20y%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript%2F&amp;title=Validar%20direcciones%20de%20e-mail%20con%20expresiones%20regulares%20en%20ASP%20y%20Javascript" id="wpa2a_14">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/' rel='bookmark' title='Validar fechas con expresiones regulares en ASP y Javascript'>Validar fechas con expresiones regulares en ASP y Javascript</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/' rel='bookmark' title='Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript'>Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validar fechas con expresiones regulares en ASP y Javascript</title>
		<link>http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/</link>
		<comments>http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 07:59:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[expresiones regulares]]></category>
		<category><![CDATA[validar]]></category>
		<category><![CDATA[validar campos]]></category>
		<category><![CDATA[validar fechas]]></category>

		<guid isPermaLink="false">http://www.programadorasp.com/?p=104</guid>
		<description><![CDATA[Continuando con las expresiones regulares, para validar fechas se puede utilizar la siguiente función en ASP: function esValidoFecha&#40;cadena&#41; set expReg = New RegExp expReg.Pattern = &#34;^(((0[1-9]&#124;[12][0-9]&#124;3[01])([/])(0[13578]&#124;10&#124;12)([/])_ (\d{4}))&#124;(([0][1-9]&#124;[12][0-9]&#124;30)([/])(0[469]&#124;11)_ ([/])(\d{4}))&#124;((0[1-9]&#124;1[0-9]&#124;2[0-8])([/])(02)([/])_ (\d{4}))&#124;((29)(\.&#124;-&#124;\/)(02)([/])([02468][048]00))&#124;_ ((29)([/])(02)([/])([13579][26]00))&#124;((29)([/])(02)_ ([/])([0-9][0-9][0][48]))&#124;((29)([/])(02)([/])([0-9]_ [0-9][2468][048]))&#124;((29)([/])(02)([/])([0-9][0-9]_ [13579][26])))$&#34; esValidoFecha = expReg.Test&#40;cadena&#41; set expReg = nothing end function La expresión regular (que se puede poner en una única línea eliminando los [...]
Related posts:<ol>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/' rel='bookmark' title='Validar direcciones de e-mail con expresiones regulares en ASP y Javascript'>Validar direcciones de e-mail con expresiones regulares en ASP y Javascript</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/' rel='bookmark' title='Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript'>Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Continuando con las expresiones regulares, para validar fechas se puede utilizar la siguiente función en ASP:</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">function</span> esValidoFecha<span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">set</span> expReg <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">New</span> RegExp
  expReg.<span style="color: #9900cc;">Pattern</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;^(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])_
                    (\d{4}))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)_
                    ([/])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])_
                    (\d{4}))|((29)(\.|-|\/)(02)([/])([02468][048]00))|_
                    ((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)_
                    ([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9]_
                    [0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9]_
                    [13579][26])))$&quot;</span>
  esValidoFecha <span style="color: #006600; font-weight: bold;">=</span> expReg.<span style="color: #9900cc;">Test</span><span style="color: #006600; font-weight:bold;">&#40;</span>cadena<span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">set</span> expReg <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">nothing</span>
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">function</span></pre></div></div>

<p>La expresión regular (que se puede poner en una única línea eliminando los _ finales) es un poco larga porque ha de tener en cuenta los días de los meses del año, los años bisiestos,&#8230; Para validar del lado del cliente (antes de enviar el formulario), se puede utilizar el mismo patrón en Javascript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> esValidoFecha<span style="color: #009900;">&#40;</span>cadena<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  strExpReg <span style="color: #339933;">=</span> <span style="color: #339933;">/^</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">12</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#91;</span>01<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">13578</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #CC0000;">10</span><span style="color: #339933;">|</span><span style="color: #CC0000;">12</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>_
                <span style="color: #009900;">&#40;</span>\d<span style="color: #009900;">&#123;</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">12</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #CC0000;">30</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">469</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #CC0000;">11</span><span style="color: #009900;">&#41;</span>_
                <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>\d<span style="color: #009900;">&#123;</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">|</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">8</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>02<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>_
                <span style="color: #009900;">&#40;</span>\d<span style="color: #009900;">&#123;</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">29</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>\.<span style="color: #339933;">|-|</span>\<span style="color: #339933;">/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>02<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>02468<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>048<span style="color: #009900;">&#93;</span>00<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span>_
                <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">29</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>02<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">13579</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">26</span><span style="color: #009900;">&#93;</span>00<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">29</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>02<span style="color: #009900;">&#41;</span>_
                <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">48</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">29</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>02<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span>_
                <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2468</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>048<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">29</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>02<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #CC0000;">9</span><span style="color: #009900;">&#93;</span>_
                <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">13579</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">26</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>$<span style="color: #339933;">/;</span>
  <span style="color: #000066; font-weight: bold;">return</span> strExpReg.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>cadena<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>En esta función en Javascript sí que es necesario juntar la expresión en una única línea quitando los _ porque de lo contrario no funcionará.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;count=horizontal&amp;text=Validar%20fechas%20con%20expresiones%20regulares%20en%20ASP%20y%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;counturl=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;count=horizontal&amp;text=Validar%20fechas%20con%20expresiones%20regulares%20en%20ASP%20y%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fprogramadorasp.com%2Fvalidar-fechas-con-expresiones-regulares-en-asp-y-javascrip%2F&amp;title=Validar%20fechas%20con%20expresiones%20regulares%20en%20ASP%20y%20Javascript" id="wpa2a_16">Compartir / Guardar</a></p><p>Related posts:<ol>
<li><a href='http://programadorasp.com/validar-campos-y-parametros-con-expresiones-regulares-en-asp/' rel='bookmark' title='Validar campos y parámetros con expresiones regulares en ASP'>Validar campos y parámetros con expresiones regulares en ASP</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-e-mail-con-expresiones-regulares-en-asp-y-javascript/' rel='bookmark' title='Validar direcciones de e-mail con expresiones regulares en ASP y Javascript'>Validar direcciones de e-mail con expresiones regulares en ASP y Javascript</a></li>
<li><a href='http://programadorasp.com/validar-direcciones-de-internet-o-urls-con-expresiones-regulares-en-javascript/' rel='bookmark' title='Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript'>Validar direcciones de Internet o URL&#8217;s con expresiones regulares en Javascript</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://programadorasp.com/validar-fechas-con-expresiones-regulares-en-asp-y-javascrip/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

