Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

If the text starts with Ingredients and stops to etc. you could try:

 

MiddleWords ( text ; 2 ; WordCount ( text ) - 2 )

  • Author

It is varying length of the text string between two words. 

Sometimes it could be much longer. 

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.

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

Could I please ask you help how to write this calculation

to put in a field "Ingredients"

 

I think that there are no doubts.

  • Author

To move to another field  from another large field of text 

or try this:

 

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

Thanks so much 

That is perfect

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.