Help

Extract multiple data from text

Topic Labels: Formulas
1110 6
cancel
Showing results for 
Search instead for 
Did you mean: 
ClemC
4 - Data Explorer
4 - Data Explorer

Hello the community!

I'm trying to do an extraction from a text but I can't get it 

My Initial text looks like that : 

 

 

RP-34, CP-4554, IO-34, REQ-455, DK-344, REQ-44, REQ-404, FG-34

 

 

 and I would like to export the list of items with REQ to have this result: 

 

 

 

REQ-455, REQ-44, REQ-404

 

 

Does anyone have an idea of what formula to use? 🙄

Thanks a lot!

 

6 Replies 6
Ron_Daniel
7 - App Architect
7 - App Architect

There are several different ways to approach this, but the one to use depends upon where the initial text is coming from. Is it a text field, a rollup, or an array of some sort?

ClemC
4 - Data Explorer
4 - Data Explorer

Hi Ron_Daniel,

The inital text is a text field 🙂

Ron_Daniel
7 - App Architect
7 - App Architect

I've approached this from quite a few angles and unfortunately Airtable has some limitations when it comes to regular expressions. Are the numbers after REQ- always two or three digits? If not, what would their range be?

ClemC
4 - Data Explorer
4 - Data Explorer

Yes I have always a number after REQ-
Could be 1 to 5 digits 🙂

Ron_Daniel
7 - App Architect
7 - App Architect

The regular expression to grab the "REQ-" with 1-5 numbers after it would be

REQ-\\d{1,5}
However, I'm at a loss for how to get Airtable to get more than the first instance of it.
In this table, the formula for "Only the REQs" is
REGEX_EXTRACT({Text Field}, "REQ-\\d{1,5}")
but as you can see it's only grabbing the first one. Hopefully someone smarter than me has the other piece to this puzzle.
Screen Shot 2023-02-22 at 12.16.36 PM.png

ClemC
4 - Data Explorer
4 - Data Explorer

Thanks a lot for your time and help Ron_Daniel ! 

Does anyone have an idea?