Here's how you do it !
/^[a-zA-Z0-9]{7,32}$/
Don't forget the "beginning to end" markers.
For the record, if you want it the string to definitely include both letters and digits, there is no way to do that with one regex. (In fact, mathematically you could do it, but the regex would be enormous.)
Simply run the above check, and THEN ALSO CHECK that it contains a letter: /[a-zA-Z]/
And THEN ALSO TEST that it contains a digit: /[0-9]/
That's the easiest way.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…