Método String search() en JavaScript
<!DOCTYPE html> <html> <head> <title>match()</title> </head> <body> <script type = "text/javascript"> var emailAddr = "admin@scriptbc.com"; var miRegex = /\.com/; var resultado = emailAddr.search(miRegex); alert(resultado); //Regresa 14 </script> </body> </html>Si no hay coincidencia regresa -1
Si te hemos ayudado : )
Te agradeceríamos que apoyaras este proyecto
en:

0 comentarios:
Publicar un comentario