In the below code i have a textbox in which when i enter numeric it should alert that only alphabets are allowed.In which i get the regular expresion and spilt it and store in an array and for loop it and check the regular expression that i enter in my textbox.Pls help to solve the issue.

```
<input type="text" id="check" onblur="validate()" />

<script type="text/javascript">
    function validate() {

        var hiddenValue = new RegExp( "[A-Z]~~[a-z]");
        // var val = document.getElementById("check").value;
        var mySplitResult = new Array();
        mySplitResult = hiddenValue.split("~~");
        for (i = 0; i < mySplitResult.length; i++) {
            document.write("<br /> Array[" + i + " ]= " + mySplitResult[i]);

            if (mySplitResult.test(document.getElementById("check").value)) {
                alert('check');
                return false;
            }
    }

}
</script>

```