Return to Snippet

Revision: 47188
at June 2, 2011 02:57 by erraja_07


Initial Code
function validatEmail(txt_msg)
	{
		var pattern = /[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/g; 
		return(pattern.test(txt_msg));
	}
	
	function validatMobile(txt_msg)
	{
		var testPattern = /[0-9]{10,11}/;
		return( testPattern.test(txt_msg));	
	}
	
	function validateSpecialCharacters(txt_msg)
	{
		var testPattern = /[-[\]{}()*+?.,\\^$|#\s]/;
		return( testPattern.test(txt_msg)); 	
	}

Initial URL
http://simonwillison.net/2006/Jan/20/escape/

Initial Description


Initial Title
Javascript  Match email , phone number and special characters from a String(textarea)

Initial Tags
javascript

Initial Language
JavaScript