regexnotepad++textpad

Remove 8 char, save 4, remove 4, save 4, replace 1 and keep rest of the line


In every line I would like to:

and then do it for every line

I have started with:

^.{8}(.{4}).{4}

Is it possible to in oneline or repeat the pattern...

(I use Notepad++ and TextPad)


Solution

  • This should do the trick. Simply count the characters as you've done and replace with the capture groups and a space.

    Find

    ^.{8}(.{4}).{4}(.{4})(.{1})
    

    Replace (incl. the space after $2)

    $1$2 
    

    https://i.gyazo.com/e0b5d392caaaccfb8747cc15e37e3e96.gif