I have following regex that matches any number in the string and returns it in the group.
^.*[^0-9]([0-9]+).*$ $1
Is there a way I can get the text before and after of the matched group i.e. also as my endgoal is to reconstruct the string by replacing the value of only the matched group.
For e.g. in case of this string /this_text_appears_before/73914774/this_text_appears_after
, i want to do something like $before_text[replaced_text]$after_text
to generate a final result of /this_text_appears_before/[replaced_text]/this_text_appears_after