The power of regex in VSCode

Remove lines

Example raw data



stspg-webhook.xxx.io

xxx.io

slackbot.xxx.io

xxx.io

jp-api.xxx.io

Solution

  1. Remove all top level domain with new lines
    1. Search with ^xxx.io$ , replace with empty string
  2. Remove all empty new lines
    1. ^\n\n
    2. ^\n

Photo by Joshua Aragon on Unsplash