I've tried to make a regular expression that match anything except if contains a 11 digits like 12345678910 so don't match anything what i have tried
[^\d{11}]
but {11} doesn't work with \d expression so what i have to do ?
I've tried to make a regular expression that match anything except if contains a 11 digits like 12345678910 so don't match anything what i have tried
[^\d{11}]
but {11} doesn't work with \d expression so what i have to do ?
It's not a very good task for regex to solve actually, because you have to describe every string that doesn't contain 11 consecutive digits.
If possible, I suggest matching a string that does contain 11 consecutive digits, then inverting the success of that match with the language or tool from which you execute this regex.
Depending on your regex flavour, you might also be able to use a negative lookahead such as presented in other answers.
This seemed to work for me using a negative look around:
/^((?!\d{11}).)*$/gm