hi there I am new to regular expressions and was looking for a javascript code which would validate a string which should contain 40 characteres from a-z or 0-9, for instance: 2ec04e0ae92046ec02cfss1d0306b074d9270580 Thank you M
var str = '2ec04e0ae92046ec02cfss1d0306b074d9270580'; if (/^[a-z0-9]{40}$/i.test(str)) alert('OK'); Code (markup): Regards