I want only digits existing between two characters in order to get an integer dollar value, e.g. from string:
"Advance [Extra Value of $1,730,555] in packages 2,3, and 5."
we want to obtain "1730555".
We can use \$(.*)\] to get "1,730,555", but how do we remove the commas in the same expression, while retaining the possibility of arbitrary many commas, ideally getting the number in a single capturing group?
replace(',','').replace(',',''). A regex engine cannot perform a replacement while extracting at the same time.