I have problems with RegEx. How do I get an 12 signs long part of a string which contains at least 1 number and 1 letter?
Example: \"This is 12 signs long:
To find an alphanumeric word of length 12 within a longer text, use
(?i) # Case-insensitive matching
\b # Start of word
(?=[A-Z]*[0-9]) # Assert presence of at least one ASCII digit
(?=[0-9]*[A-Z]) # Assert presence of at least one ASCII letter
[A-Z0-9]{12} # Match exactly 12 ASCII letters/digits
\b # End of word
or (for JavaScript, because it doesn't support verbose regexes)
/\b(?=[A-Z]*[0-9])(?=[0-9]*[A-Z])[A-Z0-9]{12}\b/i