Forum Discussion
JCountryman
Mar 09, 2023Copper Contributor
Cell has a list wrapped in html. Split list into 2 separated by special character
I have an excel file that has a list of items that are wrapped in html code. I would like to split it into 2 groups and move them into 2 different cells and separate the list with a special character...
peiyezhu
Mar 10, 2023Bronze Contributor
peiyezhu
Mar 10, 2023Bronze Contributor
create temp table aa as
select *,udf_strip_tags(`Long Description`) plan from Split_list_into_two_separated_by_special_character;
select `Long Description`,regexp2('Includes:([\s\S]*)Optional',plan,1) Plan_inc,regexp2('Optional[\s\S]*Include:([\s\S]+)$',plan,1) Option_inc from aa;
select *,udf_strip_tags(`Long Description`) plan from Split_list_into_two_separated_by_special_character;
select `Long Description`,regexp2('Includes:([\s\S]*)Optional',plan,1) Plan_inc,regexp2('Optional[\s\S]*Include:([\s\S]+)$',plan,1) Option_inc from aa;