If, however, I needed to keep all the hashtags on one line, can this be easily amended? The guys in charge of the accounts I'm administering prefer to keep all the hashtags on one line (no reason given, but there you are).
I really appreciate you doing this. Hopefully it will work in my version of KB. Because I'm such a lightweight user and barely scratch the surface of what it can do, I've never bothered to upgrade.
Same caveats as gglick with a simpler solution that works for any number of links or hashtags.
It seems all you want to do is put the link (here represented to account for both http and https) and all the hashtags (#) on separate lines from the post. This does that when you copy the text to the variable kmVar.
You would copy a selection in your queue window to the variable and, after processing, paste the result back to your queue window, of course. This is just a demo.
@gglick Unfortunately, Gabe, your very excellent solution doesn't work with my installation. I'm not sure why, but will try to trace back through it and see what I find.
This also captures the RSS feed body prior to the URL, just in case you need that.
It handles any number of hashtags, including none. If there are none, then the Capture Group #3 will return an empty string.
Here is a complete macro, starting with the one that @gglick posted (which should have worked for you). My thanks to @gglick for providing the original macro that I started with.
This is a simple macro which uses the very power native RegEx Search that KM provides, without using any scripts.
MACRO: Extract RSS Feed Body, URL, and Hastags [Example]
**Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/c/d/cd2122331ac663de5a9f97ec43d9235e15a71a7f.kmmacros">Extract RSS Feed Body- URL- and Hastags [Example].kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
### ReleaseNotes
Author: @JMichaelTX based on macro by @gglick
<img src="/uploads/default/original/3X/d/b/dba0d71dc05247a554ef8ab9ba88da6f85d6084e.png" width="604" height="2178">
I posted a screenshot of the solution that I've got working above your reply here. I don't use the forum often, so perhaps I'm not posting things in their best way.
Thanks for your further suggestions. I'll have a look at those as I'm sure they will be useful in future.