I have the following string:
ref:_00D30jPy._50038vQl5C:ref
And would like to formalize the following output string:
5003800000vQl5C
The required regex actions are:
- Remove all leading characters until the digit '5'.
- Add 5 zeros starting the fifth digit.
- Remove the closing ':ref'.
I initially made the following regex to match the whole string: (ref:(\S+):ref)
How can I alter the Python RegEx to achieve the above?