Community
    • Login

    Remove every other character

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 1.6k 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.
    • Swag PotatoS
      Swag Potato
      last edited by

      I’ve opened a corrupted jpg file in notepad++ and noticed that every character is doubled. For example, instead of going “ÿØÿà JFIF” at the start, it goes “ÿÿØØÿÿàà JJFFIIFF”. This goes on for the whole 2456 lines. I want to know if there’s a way to remove every other character to make it normal again as I’m pretty sure this is the root of the corruption.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by

        Hello, @swag-potato and All,

        Weird request ! Anyway, @swag-potato, here is a solution :

        • Open the Replace dialog ( Ctrl + H )

          • SEARCH (\w)\1

          • REPLACE \1

          • Tick the Wrap around option

          • Select the Regular expression search mode

          • Click on the Replace All button

        Notes :

        • This regex change any doubled word character with this word char

        • If some non-word chars ( as :, # or €,… ) exist in your .jpg file, prefer the following search regex (?-s)(.)\1 !

        Best Regards

        guy038

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn @Swag Potato
          last edited by

          @Swag-Potato said in Remove every other character:

          I’ve opened a corrupted jpg file in notepad++

          Editing a non-text file in Notepad++ is probably a pretty good way to ensure corruption, not eliminate it. My advice: Don’t do this.

          connor austinC 1 Reply Last reply Reply Quote 3
          • connor austinC
            connor austin @Alan Kilborn
            last edited by

            @Alan-Kilborn this file i have the same one its from a game called “People Playground” and the Devs of the game made this file for people who know how to edit . JPG and they did this as a joke but despite this people were able to do this and see the image the file is modulo2.jpg if you want to know more about it just search up the file name and click on the first result.

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