i want to filter dots in a textbox using javascript if the input contains only dots. If the input contains dots in between alphabets and numerals the javascript should not filter.I have a javascript which filters dots even in between alphabets and numerals. Can any1 Help me..Below is my script: function addressValidation(obj) { var regex = new RegExp("[.]"); if(obj.value.match(regex)) { alert("Dot is not allowed"); obj.focus(); return false; } }