Another solution, with only one regex:
m/\d[a-zA-Z]|[a-zA-Z]\d/;
This works because in a string with both letters and numbers there has to be at least one location where a letter and a number touch
Update: To Laurent_R: Absolutely. Clarity and simplicity always wins. Except when this line is in the 3% of code that needs 99,7% of the runtime of a program and you have to optimise for speed
In reply to Re: regex help
by jethro
in thread regex help
by kelscat18
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |