Forum Moderators: open
<script type="text/javascript">
function checkEntry(val) {
if (!val.match(/^[a-z]{3}[0-9]{4}$/i)) {
alert('no good.');
return false;
}
return true;
}
</script>
<form onsubmit="return checkEntry(this.entry.value)">
<input type="text" name="entry">
<input type="submit">
</form>
if you want the letters to be case insensitive you might need to tweak it a little from: [a-z] to [a-zA-Z]
some good reading
[regular-expressions.info...]