# Find the number surrounded by square braces using regex

I need to remove all the numbers appearing inside square braces such as [9] , [2] , ....

This is my regex:

"(?:$\d*$)"


Which is working fine. But I am totally new to regex so let me know if is there a better regex that can be used.

Try Online

You don't need the grouping here, and also you'd want to match for 1 or more digits: "$\d+$"