REGEX_EXTRACT extracts only the first match, not all matches.
I’d just REGEX REPLACE for this to match everything but the first letter and replace it with “”. As follows:
This matches whole words, minus the first character
But yes, none of the REGEX commands use the global flag and will stop at the first match
I’m getting an error using REGEX_REPLACE even though the formula works on regex101. I’m trying to add or to the last item in a series.
My formula in Airtable:
Welcome to the community, @jj23! When testing on Regex101, you need to use the Golang variant (originally labeled “RE2” when these functions were first released), which apparently doesn’t support the “?=” syntax. The “PCRE2” variant where this does work is apparently not the same variant of RE2 as the Golang version.
As a side note, you don’t need to copy the opening forward slash (or, for Golang, the graves). Those surrounding symbols are only required when pasting the regex directly into the relevant scripting language. For Airtable, you’re passing the regex as a string, so it doesn’t need the extra formatting characters.
After a little fiddling, I got this to work:
REGEX_REPLACE(String, ",([^,]*$)", ", or$1")
Absolutely glorious @Justin_Barrett , thank you. Now my “Artists” field displays beautifully:
“Sunchase, NickBee & Teddy Killerz”