CorentinTh / it-tools

Collection of handy online tools for developers, with great UX.
https://it-tools.tech
GNU General Public License v3.0
22.93k stars 2.78k forks source link

[TOOL IMPROVEMENT] Removal of prefixes/suffixes in lists #702

Open Steltek opened 1 year ago

Steltek commented 1 year ago

Sometimes you receive a list like this one:

- user1@domain.tld
- user2@domain.tld
- user3@anotherdomain.tld

No computer in this world will accept these as arguments to commands with the extraneous "- " in them. Of course, you can run a find/replace in any text editor to replace "- " with nothing, but what if the list looks like this?

-user1@domain.tld
-user2@domain-ohnotheresadash.tld
-user3@another-domain.tld

Now you're off to regex-land to try and remove the dash at the beginning without affecting the rest of the line.

It would be nice if the list converter could be given a prefix and suffix that it would remove from the beginning/end of each line.

sharevb commented 1 month ago

Hi @Steltek, @CorentinTh (and @steffenrapp, if you want to review), implemented in #1302