Community
    • Login

    Regex - Find in Files.. and remove all files that contain any characters other than letters and numbers

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • StasS
      Stas
      last edited by

      Hello! Please help!

      1. I need to delete all files that contain any characters other than letters and numbers.

      2. Remove any characters other than letters and numbers in all txt files.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • StasS
        Stas
        last edited by

        But best of all is the ability to list all the characters that are in some documents. Then remove all these documents or replace these symbols on any others.

        1 Reply Last reply Reply Quote 0
        • Claudia FrankC
          Claudia Frank @Stas
          last edited by

          @Stas

          a regex can modify text but cannot delete files.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • Vasile CarausV
            Vasile Caraus
            last edited by

            You can to this. make a search and replace in all files with Regular Expression:

            1. Search [~}{@%.!)\]*(?&$#,=/[^+-]
            2. Replace by (leave empty)

            This will delete all the special characters from files, and will remain only letters and numbers.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors