PHP regular expression matches a combination of 6 to 16 characters (and can only contain digits, letters, and underscores)
This article describes how to use php regular expressions to match a combination of 6-bit and 16-bit characters. this regular expression must only contain numbers, letters, and underscores. For more information, see. Requirement: php regular expression matches a string of 6 to 16 bits. Only 6 to 16 characters including digits, letters, and underscores are allowed. True is returned. otherwise, false is returned. Answer: 6 to 16 digits. the regular expression can be written as follows: {6, 16 }. The regular expression of any 6 to 16 characters is as follows :. {6, 16} only allows combinations of numbers, letters, and underscores. the regular expression is [0-9_a-zA-Z]. The Complete regular expression is: ^ [_ 0-9a-z] {6, 16} $The following is an example of applying this regular expression to verify the password.
'; $ Password = 'abcdeasdas _ 000000'; if (ispassword ($ password) {echo' conforms to ';} else {echo' does not match ';} // output conformity?> |