Postgresql – Adding a comma to strings that matches a regular expression pattern, but a few characters away
I am trying to add a comma and a space to my strings. Here are some examples: {ELEPHANT:1, FENNEC_FOX:1NAKED_MOLE:1URCHIN:2} {DUNG_BEETLE:12URCHIN:1} {DUNG_BEETLE:1FENNEC_FOX:1URCHIN:2} Notice the inconsistent lack of ", ". I would like to outcome to be {ELEPHANT:1, FENNEC_FOX:1, NAKED_MOLE:1, URCHIN:2} {DUNG_BEETLE:1,…