In command mode:
:%s/_reg_\([0-9]\+\)$/[\1]/
Here we use `\+` to match one or more group of numbers at the end. So we don't have substitute with lines like `cad/pqr_reg_`.
In command mode:
:%s/_reg_\([0-9]\+\)$/[\1]/
Here we use `\+` to match one or more group of numbers at the end. So we don't have substitute with lines like `cad/pqr_reg_`.