Removing leftmost characters

Pirella
2014-07-24
2014-07-24
  • Pirella

    Pirella - 2014-07-24

    I have a long list of lines of the type±

    001 abc
    002 defg
    003 ghjgasd

    Now I want to remove those first characters so I end up with

    abc
    defg
    ghjasd

    Long ago I could do something like that with Q Edit by selecting the text and then pushing the left arrow key four times. Is it possible to do something like that with Notepad++?

     
  • Thomas

    Thomas - 2014-07-24

    Moin, moin,

    I see two approaches:

    1. If alle prefixes you want to delete have the same length (3 characters in your example) you can mark all the prefixes by using the column mode (press the ALT-key while marking the text).
    2. You can a regular the expression ^\w+\s+ and replace this with an x-character (see attached screen shot). In a sencond round you must replace ^x with an emtpy string.

    The second approach will work even if the prefixes have different length.

    Regards,
    Thomas