Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'recomende'@'200.234.200.16' (using password: YES) in /home/restricted/home/recomende/funcoes.php on line 40
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/restricted/home/recomende/funcoes.php on line 41
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/funcoes.php on line 65
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/funcoes.php on line 65
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/funcoes.php on line 71
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/funcoes.php on line 71
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/funcoes.php on line 82
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/funcoes.php on line 82
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/funcoes.php on line 88
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/funcoes.php on line 88
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/funcoes.php on line 96
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/funcoes.php on line 96
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/restricted/home/recomende/funcoes.php on line 97
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/funcoes.php on line 102
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/funcoes.php on line 102
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/restricted/home/recomende/funcoes.php on line 103 Arquivo de Códigos - Referências - JavaScript - Objeto String - Método replace
Precisa de um freelancer, códigos-fonte e exemplos completos? Bem-vindo(a) ao meu site. Além de realizar alguns serviços como freelancer eu tenho alguns códigos-fonte e exemplos completos de Java, Delphi, PHP, Python, C/C++, Hibernate, JPA, Spring, JSP, Servlets, Ruby, Ruby On Rails e muitas outras linguagens e frameworks. Veja como falar comigo clicando aqui.
Substitui uma substring em uma string usando expressões
regulares ou uma string de pesquisa.
Sintaxe:
string.replace(rgExp, NovoTexto)
Onde string é a string na qual a substituição
será feita. Lembre-se de que esta string não é
modificada pelo método replace. O parâmetro
rgExp é uma instância do objeto
RegExp contendo o padrão
de expressão regular e os possíveis sinalizadores.
Pode também ser o nome de uma variável ou string
literal contendo o padrão e sinalizadores. O parâmetro
NovoTexto é a string que substituirá
a ocorrência encontrada. Este parâmetro pode ser
uma função, como visto em nosso
estudo sobre expressões regulares em JavaScript.
Exemplo 1 - Como usar o método
replace para substituir uma substring em uma string:
<script language="javascript">
<!--
var frase = "Gosto de programar em JavaScript";
var frase = frase.replace("JavaScript",
"Delphi");
document.write(frase);
//-->
</script>
A execução deste código produzirá
o seguinte resultado:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'recomende'@'200.234.200.16' (using password: YES) in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 5
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 6
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 9
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 9
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 10
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 15
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 15
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 16 Arquivo de Códigos - Página Inicial
Veja dicas, truques e anotações de
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 71
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 71
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 72
Veja dicas, truques e anotações de outras linguagens
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 106
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 106
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/restricted/home/recomende/public_html/arquivo/baixo.php on line 107
Todo o conteúdo deste site,
quando não devidamente observado, pertence a seus idealizadores
e não
poderá ser usado para outras finalidades senão estudo e
aprimoramento de técnicas de programação.
Certifique-se de ler asnotas legaisantes de proceder com
o acesso e leitura do
conteúdo disponibilizado nestas páginas.