TextSoap, remove entire line containing

Hi all,

TextSoap doesn’t seem to have it’s own community so hope is okay if I ask here.

I am trying to build a cleaner which remove lines containing a subset of characters.

Tried “If Matches Text” but can’t find a way to delete the entire line. Any help appreciated!

Are you asking for the refectory? Which characters are you trying to remove? Is it - | -

Edit 1: just looking at text soap now, looks pretty cool.

Edit 2: reg exp! stupid autocorrect. Looks like you got your answer already. If you don’t want to buy something new, I’ve just been using the reg exp functions in drafts (on iOS) or BB Edit for reg exp replaces.

I am not sure about what you mean by refectory.

This is the text I need to scrub:

| Quick Open                 | ⌘ + O         |
| -------------------------- | ------------- |
| Add Comment                | ⌘ + ⇧ + M     |
| Group                      | ⌘ + G         |
| Ungroup                    | ⌘ + ⇧ + G     |
| ↑ Move Up                  | ⌘ + ⌥ + ↑     |
| ↓ Move Down                | ⌘ + ⌥ + ↓     |
| ⇑ Move to Top              | ⌘ + ⇧ + ⌥ + ↑ |
| ⇓ Move to Top              | ⌘ + ⇧ + ⌥ + ↓ |
| ⏎ Move to new Document (s) | ⌘ + ^ + N     |
| Rename                     | ⇧ + ⏎         |
| Cut                        | ⌘ + X         |
| Duplicate                  | ⌘ + D         |

I’d like to remove the line:

| -------------------------- | ------------- |

I’d like to to this by telling TextSoap to delete each line containing:

- | -

This way it will always remove Markdown table fluff, independently from how many columns the table has.

Yes TextSoap it’s pretty awesome to automate text scraping tasks! You can save “scrubs” in collections and reuse them at your will.

Yes, it looks nice. I had never gotten around to checking it out. Unfortunately, its one of those limited activation apps. My workflow runs between 3 macs so I have to pass on purchasing it as I don’t want to pay $15 more just for the 3rd one. :frowning_face:

It’s included in the Setapp subscription.

Setapp would be an option but I already own the apps that I like in Setapp and I believe Setapp would still limit TextSoap to two computers. So not worth it for me.

Use regex. Paste this into the find field:

\|[ \|-]+\|

(Note that there is a new line after the pattern. Paste the new line in there too. You want the line break as part of the find pattern.)

And keep the replace field empty.

Disclaimer: I only have TextSoap 8 as 9 doesn’t support Mojave, and regex appears to be quirky in TextSoap 8, so I hope that pattern still works for you in TextSoap 9.

Always found the TextSoap UI quirky. (Maybe it was just me. :slightly_smiling_face:) I eventually replaced all my uses of TextSoap with a Keyboard Maestro palette of commands I cobbled together. And KM is licensed for five Macs. And If I really need to clean up a file, I just open it in BBEdit and get to work.

This worked! Thanks a lot.

I am surprised that TextSoap doesn’t seem to have “Remove Line” function, as it does have many similar ones.

Always found the TextSoap UI quirky. (Maybe it was just me. :slightly_smiling_face:) I eventually replaced all my uses of TextSoap with a Keyboard Maestro palette of commands I cobbled together. And KM is licensed for five Macs. And If I really need to clean up a file, I just open it in BBEdit and get to work.

@karlnyhus that’s totally fair. You can pretty much use Keyboard Maestro for anything, although I am not that confident with it at this point.

I like the ability to save “scrubs” and use them when needed. I appreciate this level of text manipulation is achievable with Keyboard Maestro, but the organizational process of the scrubs wouldn’t be as straightforward as it is in TextSoap.

Plus, with TextSoap Agent you can integrate the scrubs in AppleScript or Keyboard Maestro.

For sure, If TextSoap wasn’t included in Setapp I doubt I would have ever even tried it.

What makes the TextSoap UI quirky?

1 Like

Every time I wanted to add a new cleaner, it was a minor ordeal to figure out how to do it and append the result to the list of my existing commands.