I want to replace a String which contains of placeholders which should only consists on digit.
For ex - this is the test string {0} with correct placeholder {1}.
Valid placeholders - {digits}
Invalid Placeholders - alphanumeric, empty, digit with whitespace, character with whitespace
Can anyone help me with a regex. I tried this but its not working -
\{((([^0-9]).+?)|(.([^0-9])+?))\}
Thank in advance!