Validating email is an very important point while validating an HTML form. You can modify or rewrite the said regular expression.

In this page we have discussed how to validate an email using Java Script : An email is a string (subset of ASCII characters) separated into two parts by @ symbol.

a "personal_info" and a domain, that is [email protected] \w+)*(\.\w{2,3})+$/.test(my Form.email Addr.value)) { return (true) } alert("You have entered an invalid email address! The length of the personal_info part may be up to 64 characters long and domain name may be up to 253 characters. The personal_info part contains the following ASCII characters. ") return (false) } To get a valid email id we use a regular expression /^\w+([\.-]? { | } ~ characters are legal in the local part of an e-mail address but in the above regular expression those characters are filtered out. It begins with at least one or more word characters including the underscore, equivalent to [A-Za-z0-9_]. function Validate Email(input Text) { var mailformat = /^\w+([\.-]? \w+)*(\.\w{2,3})+$/; if(input Text.value.match(mailformat)) { document.form1.text1.focus(); return true; } else { alert("You have entered an invalid email address!I want regex in javascript for validating number 10.89. You can filter the value as an integer number, a float number, or write a custom filter, such as a phone number filter. " + e); } } Create Float Filter Custom("Float"); function on Change Float(input){ input Key Filter. It should allow 10.89 and should not allow 10.899 i.e. See an example of custom filter of input of an float number with decimal pointer and limitation to 2 digit after decimal pointer: function Create Float Filter Custom(element ID, on Change, onblur){ try{ input Key Filter. Remove My Tooltip(); var element New Float = Element By Id("New Float"); var float = parse Float(input.value); if(input Key Na N(float, input)){ element New Float.inner HTML = ""; return; } element New Float.inner HTML = float; } as compared from the answer gven by mic... function Check Valid Amount() { var amounttext = Element By Id('txt Remittance Number').value; var amount = parse Float(amounttext); if (!