regex define number of characters code example
Example 1: regex for number and letters
let regex = /[^A-Za-z0-9]+/
Example 2: regex for counting characters
( *?[0-9a-zA-Z] *?){10,}
let regex = /[^A-Za-z0-9]+/
( *?[0-9a-zA-Z] *?){10,}