I am currently writing a small script that checks the contents of each string.
I was wondering what the REGEX would be to make sure that a string has a letter (upper or lower), a digit, and a special character?
Here is what I know so far (whcih isn’t much):
if(preg_match('/^[a-zA-Z0-9]+$/i', $string)):
Help would be great!
Thank You!
The easiest (and probably best) way is to do three separate checks with
preg_match: