les fonctions reguliere javascript

JavaScript
if(! pseudo.match(/^([a-zA-Z ]+)$/))
    alert('Pseudo invalide');
Source

Also in JavaScript: