Question:
Could regular expression check if string consist of different letters in case of given string length and any string length ? Aahdj #wrong Gdhjd #wrong Sdfgh #correct Iophdr #correctAnswer:
For a given length it is possible. You’d make each captured character a capture group, and require that the captured character does not occur ahead. Let’s say the length is 4, then:For instance in JavaScript:
If you have better answer, please add a comment about this, thank you!