Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Text parsing Question - How do I grab text between two words of varying length


This topic is 4055 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello

I have a field which contains text of recipes. 

I want to grab the text between 2 words that are always the same.

 

example:

 Ingredients apples, oranges, salt, sugar etc.  

 

grabs the text "apples, oranges, salt, sugar"

 

 Ingredients Blueberries, sugar, salt, wheat, butter, corn meal, milk, cream etc.

 

grabs the text " Blueberries, sugar, salt, wheat, butter, corn meal, milk, cream"

 

Could I please ask you help how to write this calculation

to put in a field "Ingredients"

 

Thank you

Posted

The given formula will work with varying length of the text string, if the text starts and ends ALWAYS with those two words.

 

If the text can start with other words before you get to the list of ingredients, then you have to change the calculation.

Posted

What is the purpose of the parsing out these words or grabbing them. i.e. delete them, move them to other fields, etc.?

Posted

Could I please ask you help how to write this calculation

to put in a field "Ingredients"

 

I think that there are no doubts.

Posted

or try this:

 

Let([
start = Position ( text ; "ingredients" ; 1 ; 1 )  + 11 ;
end = Position ( text ; "etc." ; start ; 1 )
];
Trim ( Middle ( text ; start ; end - start ) )
)

This topic is 4055 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.