• Login
Community
  • Login

Remove every other character

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 4 Posters 1.7k 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.
  • S
    Swag Potato
    last edited by Feb 25, 2021, 11:55 AM

    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.

    A 1 Reply Last reply Feb 25, 2021, 1:11 PM Reply Quote 0
    • G
      guy038
      last edited by Feb 25, 2021, 12:11 PM

      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
      • A
        Alan Kilborn @Swag Potato
        last edited by Feb 25, 2021, 1:11 PM

        @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.

        C 1 Reply Last reply Jun 28, 2024, 10:22 PM Reply Quote 3
        • C
          connor austin @Alan Kilborn
          last edited by Jun 28, 2024, 10:22 PM

          @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