Issue
I need help to create a regex, that checks if a string ends with a number in round brackets.
E.g. I want Example(123) OR Example (1234) to be true, but anything that does not end with a number in brackets is false.
I'm writing this in Java, so would appreciate a Java sample to help me get this regex right (I wish I paid attention to the regex lessons back in College)
Solution
Your regex would be:
\w+\s*\(\d+\)
for java
Answered By - owenizedd
Answer Checked By - Terry (JavaFixing Volunteer)