If you can’t be sure of the relative position of the number — for instance, if your filetype suffix might be ‘jpg’ or ‘jpeg’, or if the position text might be more than a single digit — but you know the relative locations of the underscore and period stay the same, you can use MID() with more confidence:
THANK YOU!!!
This is an AMAZING find. I am slow with airtable formulas as a rule - but this got me over a hump I’d been working around for 2 weeks. Specially, how to extract the web url of the attachment field (an image in my case) that does not contain the parentheses. Testing it now but positive results so far
add a second formula column that looked for stuff between the parentheses and after the first parentheses
MID(
{attachment_url},
FIND(
‘(’,
{attachment_url}
)+1,
FIND(
‘)’,
{attachment_url},
FIND(
‘(’,
{attachment_url}
)
)-(FIND(
‘(’,
{attachment_url}
)+1)
)
This helped me find the text between two parentheses - regardless of the length of the string between them! Sorry I repeated this because I wanted to make sure I could say this in as many ways as I could so people can find this when they google it!
The code above works with different characters ie < and >, ( and ). I wanted to use |bars| in my code/scoring system, so worked on this that my supervisor finally got working:
I’m curious if there’s an easy way to do this. There are a few variable digits which make it hard to do a simple left/right:
slug character count may vary (e.g., hello vs goodbye)
event # of digits may vary (e.g., 123 vs 12345)
sometimes there will be multiple strings (&utm, &test) and sometimes there will be just the one (?event). I don’t know yet if ?event will always be the first one either.
Is there any way to pull out just what’s after the “event=” but skip anything that may follow an &?