I have written a RegEx for password which takes any character with min length of 5 and maximum length of 30.
I've tried the following expression:
(\S){5,30}
but it also accepts passwords with more than 30 characters. How can I make sure it doesn't match such passwords?