Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airtable regular expression syntax in a formulae

Tags:

regex

airtable

I'm having dificulty extracting the filename from another cell. The regular expression I have works perfectly on regex101.com but only results in error on airtable.

My working regular expression has a non capturing group followed by everything else:- (?:[\\])(.*)

An example string I'm working with is Tech Stuff - Old Channels 💀 - image-assets [839605635295772672].csv_Files\IMG_0165-E23DF.JPG

Does airtable support regular expression groups and if so, what am I doing wrong.

My airtable formulae reads REGEX_EXTRACT( {Attachments}, '(?:[\\])(.*)') but results in error however REGEX_EXTRACT( {Attachments}, '[A-Za-z]*.[A-Za-z]*') gets me 'Tech Stuff' no problem but if I try REGEX_EXTRACT( {Attachments}, '(?>[A-Za-z]*)(.[A-Za-z]*)') I just get #ERROR

like image 218
spaceshipdev Avatar asked Jan 30 '26 08:01

spaceshipdev


1 Answers

You may try:

REGEX_EXTRACT({Attachments}, '[^\\\\]+\\.[^.]+$')

The regex pattern here says to match:

[^\\]+  a group on non backslash characters
\.      dot
[^.]+   the file extension

Demo

like image 124
Tim Biegeleisen Avatar answered Feb 01 '26 00:02

Tim Biegeleisen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!