Forum Discussion
anupambit1797
Sep 16, 2025Iron Contributor
REGEX+TEXTSPLIT
Dear Experts,
I have a data like below in column"A":-
And , I want to split it in the way like in "Yellow" So, after each consecutive Alphabet or number it should be splitted, I tried to do something in Column "B" but not succesful. Could you please share any solution if possible by using a comb of regex + textsplit?
Thanks in Advance,
Br,
Anupam
5 Replies
- RedNectarBrass Contributor
Hi anupambit1797 ,
On the shoulders of giants... or in this case m_tarler 's shoulders.
Try:
=TEXTSPLIT(LET(a,REGEXEXTRACT(A2,"([A-Z0-9])",1,1),CONCAT(a&IF(a=HSTACK(DROP(a,,1),""),",",""))),",")
to get what you want - at least what I THINK you want
- peiyezhuBronze Contributor
select *,regreplace('(.)(?=\1)','\1,',id) from Sheet2;
- m_tarlerBronze Contributor
I'm not good with REGEX so this is probably more complicated than needed but seems to work:
=LET(a,REGEXEXTRACT(A2,"([A-Z0-9])",1,1),CONCAT(a&IF(a=HSTACK(DROP(a,,1),""),",","")))