Is there a way to rewrite the following regex so the replacement becomes defined. My understanding is embedded parentheses cause the replacements \1, \2, etc. to become undefined.
(SVC\*HC(:\w{2,})+):\w(\*)
Sample entries this should match. The part in red should be deleted in the replacement. I'm trying to guarantee this only occurs on a line with SVC*.
SVC*HC:S5102:A*49.39*49.39**1~
SVC*HC:S5102:X*49.39*49.39**1~
SVC*HC:S5102:AB:B*49.39*49.39**1~
SVC*HC:S5102:A*49.39*49.39**1~
SVC*HC:S5102:AB:C*49.39*49.39**1~
(SVC\*HC(:\w{2,})+):\w(\*)
Sample entries this should match. The part in red should be deleted in the replacement. I'm trying to guarantee this only occurs on a line with SVC*.
SVC*HC:S5102:A*49.39*49.39**1~
SVC*HC:S5102:X*49.39*49.39**1~
SVC*HC:S5102:AB:B*49.39*49.39**1~
SVC*HC:S5102:A*49.39*49.39**1~
SVC*HC:S5102:AB:C*49.39*49.39**1~