I need a Regex to search in text files for typical password patterns, such as
A word that contains lower case, upper case letters, and digits, and is 6-30 characters long in an arbitrary text, such as the following.
This is some sample text containing an email address of michael.knight@knightrider2000.com
and some cryptic secret like am2Nals2kdP5 and even more text.
I'd like to match am2Nals2kdP5, but nothing else in that example.
I tried \s[a-zA-Z0-9]{6,30}\s
, but this matches other word like containing
, too. I understand that this is, because [...]
matches to any of the characters, instead of all of them. However I cannot find the proper syntax.