Regex for string with at least one digit AND at least one letter

  Kiến thức lập trình

I want to find with regex all occurences of a string (allowed letters and numbers) with at least one digit and at least one letter, with length between 6 and 9 (inclusive).

Samples:

My passport number is AAAAAAAAA -> No match expected 
My passport number is AAAA3AAAA -> match expected
My passport number is 333B3333 -> match expected
My passport number is 333BBB33 -> match expected
My passport number is 33333333 -> No match expected

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT