Given the string: the_number_10_is_important
, I want to capture _10_
and exclude 10
.
I essentially want to replace all underscores surrounding digits with brackets.
_\d+_
selects _10_
is my starting point. I'm trying to use lookaround or a non-capturing group eg. _(?:\d+)_