Deleting 1st 20 (or so) columns and adding text

Deleting 1st 20 (or so) columns and adding text

2

    Sep 07, 2008#1

    Sorry, I didn't know how to name the topic.

    But, basically, what I have is:

    Code: Select all

    2008-09-05-23:00,534,2012387975
    2008-09-05-23:00,534,2012866888
    2008-09-05-23:00,534,2012894626
    2008-09-05-23:00,534,2013045974
    2008-09-05-23:00,534,2013048601
    2008-09-05-23:00,534,2013049556
    2008-09-05-23:00,534,2013123625
    2008-09-05-23:00,534,2014285243
    2008-09-05-23:00,534,2014285467
    2008-09-05-23:00,534,2014673009
    And I need it to be:

    Code: Select all

    xxxxx+2012387975
    xxxxx+2012866888
    xxxxx+2012894626
    xxxxx+2013045974
    xxxxx+2013048601
    xxxxx+2013049556
    xxxxx+2013123625
    xxxxx+2014285243
    xxxxx+2014285467
    xxxxx+2014673009
    I work with a lot of files at a time, so maybe a script is better? I don't know.

    My manual procedure now is selecting the first 20 rows, deleting them and then Searching for '^p' and replacing with 'xxxxx+'.

    How can I automate my task?

    Cheers.

    236
    MasterMaster
    236

      Sep 08, 2008#2

      Activate Perl regular expressions (check the readme topic of this forum for instructions).
      Then search for

      ^.{20}

      and "replace all" with

      xxxxx+

      HTH,
      Tim

      2

        Sep 10, 2008#3

        Thanks a lot, man. You saved me hours of work. :D

        Cheers!