Hi
You can use the test() method available in javascript like this:
<script>
function check(Cntrl)
{
var str=Cntrl.value;
//look for "Hello"
var patt=/^[0-9]{0,9}(\.[0-9]{0,3})?$/;
if(patt.test(str))
{
...
}
else
{
...
}
}
</script>
and in the html code:
<input type="text" önchange="check(this)"/>