Skip to main content
Question

Extracting a sentences from paragraph (based on periods?)

  • May 31, 2025
  • 2 replies
  • 43 views

nataliagruber
Forum|alt.badge.img+3

So I have a paragraph, from which I would like to extract a few sentences via formula.

 

The reason for this is that I need to copy the sentences in the middle and insert them into other pieces of text. I need to do this a lot of times, for text in several languages I do not read, which makes it annoying to do visually. 

 

While the number of characters will vary a lot language to language, the number of sentences is the same, so I had hoped to use periods and REGEX to isolate the sentences I need. Basically I have:

 

> This is the first sentence. Here’s another sentence. Beginning of the part I need. I also need this. Here’s a sentence I don’t need. <!--more-->

 

I can use Regex and LEN to get rid of the <!--more-->,  but it seems like going further than that is beyond my current skill. 

Any ideas?

2 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Does this look right?

REGEX_EXTRACT(
{Name},
"(?:[^.]*\\.){2}([^.]*(?:\\.)\\s*[^.]*(?:\\.))"
)

 


Mike_AutomaticN
Forum|alt.badge.img+28

Adam’s answer above should work, but if it does not please do let us know.

If you only need this for a limited amount of records, and you are tiered of messing around with formulas, you can probably rely on Airtable’s AI fields to extract whatever you need with a good prompt rather than a formula. I would not suggest scaling with this given implied costs (which formula fields do not have). Just an idea!

Mike, Consultant @ Automatic Nation