How do I create a shortcut that truncates/shortens a URL copied to the clipboard?
I'd like to create a shortcut (actually for use on my iOS devices but also on my Mac) that simply grabs a URL from the clipboard, erases/truncates everything including and after the "?" symbol (i.e. removing the question mark itself and everything that comes after), and then makes the new URL available for me to copy, or even better, copies the new URL straight to the clipboard.
Unfortunately I cannot figure out how to do this and I am far from an advanced coder so I'm not sure what a lot of the commands do and how to adjust the variables to get Shortcuts to do what I want. Anyone have any ideas? I feel like this could be a simple fix, just need some pointing in the right direction.
Here's what I came up with after trying but it does not seem to be doing anything to the URL when I run it:
Thanks so much!
MacBook Pro 15″