Any way to delete every other line of text in clipboard?
Search and replace was able to get me to this point but stuck at removing this other data.
For Example if the string is:
S126SA3
06/12/18 11:22:53 627823 07/12/18 81621
S126SFG
07/16/18 12:22:53 78532645 07/16/18 8153145
End Results: S126SA, S126SFG
Real world results would be at maximum 20 results. Both the text that is wanted to keep and the ones I want removed will be different but still will always be on separate lines.
Your stated requirement is inconsistent with your "End Results", so I'm not sure exactly what you want. But this simple Macro (no script required) should get you started.
Example Results
MACRO: Get Odd Lines in Text [Example]
#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/9/b/9bcd357159da9414da3861ac107d49f39eeffe11.kmmacros">Get Odd Lines in Text [Example].kmmacros</a> (7.4 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
### ReleaseNotes
Author.@JMichaelTX
**NOTICE: This macro/script is just an _Example_**
* It is provided only for _educational purposes_, and may not be suitable for any specific purpose.
* It has had very limited testing.
* You need to test further before using in a production environment.
* It does not have extensive error checking/handling.
* It may not be complete. It is provided as an example to show you one approach to solving a problem.
**REQUIRES:**
1. **KM 8.2+**
2. **macOS 10.11.6 (El Capitan)**
* KM 8 Requires Yosemite or later, so this macro will probably run on Yosemite, but I make no guarantees. :wink:
**MACRO SETUP**
* **Carefully review the Release Notes and the Macro Actions**
* Make sure you understand what the Macro will do.
* You are responsible for running the Macro, not me. 😉
.
* Assign a Trigger to this maro.
* Move this macro to a Macro Group that is only Active when you need this Macro.
* ENABLE this Macro.
.
* **REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:**
* ALL Actions that are shown in the magenta color
* SET Source String
**USE AT YOUR OWN RISK**
* While I have given this limited testing, and to the best of my knowledge it will do no harm, I cannot guarantee it.
* If you have any doubts or questions:
* **Ask first**
* Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.
---

---
### Questions?