Skip to main content

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?

Does this look right?

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

 


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