regex check from a-z 0-9

JavaScript
myString.match(/^[A-Za-z0-9_.]+$/)
Source

Also in JavaScript: