those statements are called regexp-regex-regular expressions, as those from perl.
their structure is like this /
regex/
modifier.
for example, i would use this to make sure there are only numbers on the 'age' input:
var result = age.match(/\D/);
if (result.length >0){alert ('Only numbers please');}
for no numbers on name you can use this
var result = name.match(/\d/);
if (result.length >0){alert ('No numbers please');}
notice that i didnt use any modifier.
this may not be completely right but at least it can gives you the idea.