Home > Net >  Google Sheets, how can I remove or strip specified strings
Google Sheets, how can I remove or strip specified strings

Time:01-31

I'm using Google Sheets and trying to figure out a formula that strips or removes specific strings. So a cell might have:

[url=https:website1]https:website1[/url] [url=https:website2]https:website2[/url] and I want to convert it to https:website1 https:website1

Each cell in the column will have different "websites" but the formatting will be similar. Any help is appreciated.

I've tried REGEXEXTRACT and SUBSTITUTE functions but can't seem to figure it out.

CodePudding user response:

can you try:

=BYROW(A2:A,LAMBDA(ax,IF(ax="",,TEXTJOIN(CHAR(10),1,INDEX(REGEXEXTRACT(SPLIT(ax,"[url=",0,0),"[^\]]*"))))))

enter image description here

  • Related