Formula to find a name within a text string

I’m not great with formulas, but I’ve spent hours on google and airtable forums trying to figure out how to do this. Let me see if I can explain this well. I have a string of text and I’m trying to find the first name of the person listed in the text. The text looks something like this:

Hi Stylist,

You have a new reservation.

Customer First Name: John
Customer Last Name: Doe
Customer Phone #: 1234567890
Customer Email:
Location: Salon

Date: Thursday, December 9, 2021

Service: Package 1

Employee: Stylist

Time: 1:45pm

Yours Truly,

The Team

I just want to grab the First name only from the string and I can’t for the life of me figure out how to format the formula.
Any help would be much appreciated!!

Hi Emily- Using the following formula in a formula field called “First Name” should do the trick, where “Reservation Field Name” is replaced with the name of the field holding the text content:

REGEX_EXTRACT({Reservation Field Name},“Customer First Name: (.*)”)

Hi Johnathan, thanks so much for your response. I feel like that’s close but for some reason I keep getting an error in the formula: “Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.” Any suggestions?

Besides making sure to replace your actual field name, please also make sure to replace the angled double quotes with regular double quotes. The below should work.

REGEX_EXTRACT({Reservation Field Name},"Customer First Name: (.*)")

1 Like

That worked, thank you so much!!

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.