All I try to do doesn't work. I can't combine this two regexes:
^(?!(.)\1+$).{8,40}$ //this doesn't let to create word with only one symbol like '111111111111' or enter code here`fffffffffffff`
^\s|\s$ //this checks if first or last symbol is space
So I need regex that will include first one and opposite of the second one, e.g.: word should be more than 8 symbols, not be containing only one symbol and first and last symbol shouldn't be space.