i use regex tools a lot in my work. coda has its own particular implementation of the regex engine. so i needed a TOOL to help me verify what my coda code was doing with particular regex expressions and settings.
so i made this ultra simple tool that shows how the RegexMatch()
, RegexExtract()
and RegexReplace()
formula functions work with my strings.
sharing it here as i imagine it is useful for other makers as well
max
13 Likes
Would love to see it! But sharing permissions aren’t set correctly. Can you shift it so we can view?
@Scott_Collier-Weir oops… try again?
I hope to use Regex more in the future so this will be really helpful. I saved your post so that I can go back and check it out. Thank you so much!
1 Like
This is great! Thanks for sharing!
1 Like
Wanted to share a quick insight on the RegexReplace
function, especially when dealing with backslashes in inline strings in formulas.
Issue: Using RegexReplace("\\","\\\\","\\")
yields a double backslash (\\) instead of the perhaps expected single backslash.
Explanation: This happens because in Coda.io, “\\” is indeed read as “\\”, but a single “\” cannot be directly entered as it escapes the closing quotation mark. So, the string needs to be entered with double backslashes to be parsed.
Workarounds: A simple fix is using Character(92)
for a backslash, or retrieving it from a table field.
Conclusion: Hope this helps those dealing with backslashes in RegexReplace. If you’ve found other methods or have questions, feel free to share!
I have been using Grok AI to help me write Regex formulas… it is WICKED good!