I want this regex to remove everything except one match, the regex is matching the digits right but i want to negate it so it will only leave the 11 first digits match
So if i have like blablalbla: cool - 12345678900 blablabla: - 2/22/2222 cool 19292 The regex matches the digits (12345678900) as i want to, but i need it to match everything else than the 11 digits
Here is the regex: (\d{11})
I read some things on regex101 and regexr, tried doing some live regex test but i didnt figured out how to do that
I saw that "^" also works as a negation but i tried that and it seems doesnt work, how should i do that negation and can you explain please, thank you so much <3
ANSWER:
got it working with ^.*(\d{11}).*$
and replacing with $1