Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

regexextract all groups from list as arrayformula

I'm looking for a regex arrayformula which would be able to extract all possible groups from a list. here is a visualisation:

image here

so far I tried:

=ArrayFormula(REGEXEXTRACT(A2:A6, "["&TEXTJOIN("|", 1, A8:A)&"]"))
=ArrayFormula(REGEXEXTRACT(A2:A6, "[("&TEXTJOIN("|", 1, A8:A)&")]"))
=ArrayFormula(REGEXEXTRACT(A2:A5, "["&TEXTJOIN("|", 1, "("&A8:A&")")&"]"))
...
like image 906
asdtjhkl Avatar asked Jun 13 '26 10:06

asdtjhkl


1 Answers

you can fake it like this in B2:

=INDEX(IF(REGEXMATCH(A2:A5, 
 TRANSPOSE(SUBSTITUTE(A8:A10, " ", ".*"))), TRANSPOSE(A8:A10), ))

enter image description here

like image 181
player0 Avatar answered Jun 16 '26 04:06

player0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!