Hello, i want to to validate a string if contains only a-z, 0-9, and the symbols . - _ @ and ; i have this code:
var regex = new RegExp('[a-z0-9@.;_-]{8,}');
and is not far from what i am looking for but it return true also for:
'[email protected] °%'
I'm working with jquery to load the string by a div, i put a some code more:
var mailinglist= $('#mailinglist').val();
var regex = new RegExp('\^[0-9a-z.-_;@]{8,}$\','i');
if (mailinglist.match(regex)){}
else{}
i need the match to return false if is present a blank space or any other char not defined in the pattern.
thanks :-)