I’m trying to pull out a filename from a text field using regex patterns. The pattern works fine when I test it online but breaks when I use it in Airtable.
I want to extract everything after the backslash. My regex pattern is (?:[\\])(.*) which uses a non-capturing group for the backslash followed by a capturing group for the filename.
When I write REGEX_EXTRACT({FileData}, '(?:[\\])(.*)') it throws an error. But simple patterns like REGEX_EXTRACT({FileData}, '[A-Za-z]+\.[A-Za-z]+') work and return ‘Project Files’.
If I try REGEX_EXTRACT({FileData}, '(?>[A-Za-z]+)(\.[A-Za-z]+)') I get #ERROR again.
Does Airtable have limited regex support? What’s the right way to use capturing groups in their formulas?
yeah, airtable’s regex can be a bit tricky. maybe try REGEX_EXTRACT({FileData}, '\\(.*)$') since double backslashes are important. simpler stuff usually does the job better.