Im writing some code that checks a password. One of the things i want to do is ensure that the string contains at least one letter and at least one number - ie ajk4ti would be accepted but gjknbx and 3847584 would be rejected.
I could obviously do this with loops going through the string, but there must be a more elegant solution that eludes me - can anyone help? Thanks.