Can Regex limit the number of instances of any character in a string, for example, 5?
For example: abacaada will fail (or match) due to 5 instances of the character a.
To clarify, I was looking for any character, not just "a." That is, no character can be repeated more than x times.
source
share