Remove Vertical Line(s)

I run into a lot of internet pages that use “|” to separate parts of a webpage title. Would it be possible for someone to write an extension to remove these? Or perhaps change to a hyphen? They throw an error when uploading URLs to various cloud storage systems. Thanks!

1 Like

Sorry for the delay but this should do it!

# popclip
name: Bar to Hyphen
icon: square filled |
javascript: popclip.pasteText(popclip.input.text.replace(/\|/g, '-'))
description: Replace vertical bars with hyphens

(The above block is an extension snippet - select it to install the extension with PopClip)

CleanShot 2022-03-23 at 12.55.19

1 Like