0

I am facing a bit of a problem, i am not good at programming yet. i have a text that looks like this:

D28151373 15-04 040 028230457 01-01 015 D28250305 01-08 048 D28250661 03-01 032 028151376 12-01 057 028230460 01-01 001 D28250305 01-09 049 D28250663 03-01 025 028151377 12-01 057 028230462 01-01 014

just like a million times longer.

What I need to do is to delete the first character and then keep the next 11 characters (including spaces) and the delete the next 9 characters, keep 11 characters, delete 9 characters, and on and on and on...

There must be a simple way to make a script do this automaticity but I simply can't figure out how. (BTW I am good at understanding the code but I am lost when i have to start myself) and what is the best program to do this simple task in, I was thinking about Notepad++ or C++.

Richard
  • 106,783
  • 21
  • 203
  • 265

2 Answers2

0
  • Ctrl+H
  • Find what: .(.{11}).{8}
  • Replace with: $1 <-- there is a space after $1
  • Replace all

Explanation:

.       : 1 character
(.{11}) : group 1, 11 characters
.{8}    : 8 characters

Replacement:

$1   : group 1 and a space

Result for given example:

28151373 15 28230457 01 28250305 01 28250661 03 28151376 12 28230460 01 28250305 01 28250663 03 28151377 12 28230462 01 
Toto
  • 89,455
  • 62
  • 89
  • 125
0

You may also use a Notepad++ macro:

  • Macro → Start Recording
  • Del Ctrl+→ Del Del Del Del Del Del Del
  • Macro → Stop Recording
  • Macro → Run a Macro Multiple Times...
Polluks
  • 525
  • 2
  • 8
  • 19