Skip to main content
Question

Any suggestions on how to convert contents of attribute into bullet list in Markdown?

  • October 25, 2018
  • 2 replies
  • 9 views

friesewoudloper
Participant
Forum|alt.badge.img+1

My dataset has an attribute that contains a list of item descriptions and hyperlinks:

Item 1|http://www.item1.com^Item 2|http://www.item2.com^Item 3|http://www.item3.com

I'd like to change the contents of the attribute into a bullet list in Markdown:

* [Item 1](http://www.item1.com
* [Item 2](http://www.item2.com)
* [Item 3](http://www.item3.com)

What would be the best way to do this? The list in the attribute can contain zero, one or n items.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • October 25, 2018

On solution could be to use an AttributeSplitter on "^" followed by a ListExploder and a StringReplacer where you look for the following regex:

^([^\|]*)\|(.*)$

and replace it with:

* [\1](\2)

friesewoudloper
Participant
Forum|alt.badge.img+1

On solution could be to use an AttributeSplitter on "^" followed by a ListExploder and a StringReplacer where you look for the following regex:

^([^\|]*)\|(.*)$

and replace it with:

* [\1](\2)
Thank you very much!