Extend regex_replace for formula fields

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:

  1. Takes 22 (Group 2)
  2. Adds a dot .
  3. Adds 1187-xdg (Group 1)
  4. Adds -9955221 (Group 3)

Hey @m3tam3re, thank you for sharing your idea. I’ll make sure to discuss it with the team. :raised_hands:

1 Like

Hey @m3tam3re, this request was accepted! Thank you for the input :raised_hands:

Great :tada: Thanks for the info.