do:
^(?=.*(?:[A-Za-z].*\d|\d.*[A-Za-z]))[A-Za-z0-9]{10,50}$
(?=.*(?:[A-Za-z].*\d|\d.*[A-Za-z])) is a positive result with zero width, this ensures that there is at least one letter, and one digit is present
[A-Za-z0-9]{10,50} ensures that the match contains only letters and numbers
Demo
Or even cleaner, use two kinds instead of two ORGING (thanks to chris85 ):
^(?=.*[A-Za-z])(?=.*\d)[A-Za-z0-9]{10,50}$
heemayl
source share