Convert comma separated list to line separated list

Convert this:
Automotive, Events, Food & Drink, Home Goods, Miscellaneous, Restaurants, Software Apps, Travel

to this:
Automotive
Events
Food & Drink
Home Goods
Miscellaneous
Restaurants
Software Apps
Travel

And the reverse function. If someone knows where this exists, I’d appreciate hearing about it. Thank you!

1 Like
# popclip
name: OneLine - MutiLine
icon: square =
actions:
  - title: One 2 Muti
    icon: square =
    javascript: return popclip.input.text.split(/\s*,\s*/).join('\n')
    after: paste-result
  - title: Muti 2 One
    icon: square -,
    javascript: return popclip.input.text.split(/\s*\n+\s*/).join()
    after: paste-result
1 Like