Regex_replace is a great feature when using formulas. To make this even better it would be great if we could work with capture groups and backreferences.
Input: 1187-xdg-22-9955221
Regex: (\d{4}-\w{3})-(\d{2})(.+)
- Group 1
$1:1187-xdg - Group 2
$2:22 - Group 3
$3:-9955221
Replace pattern: $2.$1$3
Result: 22.1187-xdg-9955221
The transformation:
- Takes
22(Group 2) - Adds a dot
. - Adds
1187-xdg(Group 1) - Adds
-9955221(Group 3)