Dec 12, 2021 03:52 PM
Hello!
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: johndoe@gmail.com
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!!
Solved! Go to Solution.
Dec 13, 2021 06:46 AM
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: (.*)")
Dec 12, 2021 07:32 PM
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: (.*)”)
Dec 13, 2021 04:44 AM
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?
Dec 13, 2021 06:46 AM
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: (.*)")
Dec 13, 2021 06:58 AM
That worked, thank you so much!!