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...
JCountryman
Mar 09, 2023Copper Contributor
Patrick Im not having much luck trying to emulate what you created. Could you please take a look
peiyezhu
Mar 10, 2023Bronze Contributor
- JCountrymanMar 11, 2023Copper Contributor
peiyezhu for the plan and option we would need a special character ">" in-between the each bullet in the "Plan" and "Option" cells.
Is there a way to run a script so this is automated? There will be a total of 8-10 Long descriptions.
Let me know if this can be done
- peiyezhuMar 11, 2023Bronze Contributor
php
https://www.php.net/manual/en/function.strip-tags.php
https://www.php.net/manual/en/function.preg-match-all
vba
https://software-solutions-online.com/vba-regex-guide/
https://answers.microsoft.com/en-us/msoffice/forum/all/building-and-using-regex-patterns-in-vba/955f7d59-82bb-4897-8e24-bb02b4c1137a
online tool
http://e.anyoupin.cn/ceshi/jstest/pull_up_demo.php?s=Split_list- JCountrymanMar 11, 2023Copper Contributor
peiyezhu This is way to complicated for me. is there a easier way to do this or can you create a automation to run this on my excel sheet?
- peiyezhuMar 10, 2023Bronze Contributorcreate 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;