title: How to fill a field with spaces until a length in Notepad++
body: <p>I've prepared a macro in Notepad++ to transform a ldif file in a csv file with a few fields. Everything is OK but I have a final problem: I have to have 2 fields with a specific length and in this moment I cannot ensure that length because in the source file they are not coming so</p>
  
  <p>For instance, I generate this line:
  12345,namenamename,123456</p>
  
  <p>And I have to ensure that the 2nd and 3rd fields have 30 (filling with spaces at right side) and 9 (filling with zeros at left) characters, so in this case I should generate:
  12345,namenamename                  ,000123456</p>
  
  <p>I haven't found how Notepad++ could match a pattern in order to add spaces/zeros, so I have though in to add 1 space/zero to the proper field and repeat this step so many times as needed to ensure the lengths (this is, 29 and 8, because they cannot come empty) and search with the length in the regex (for instance: \d{1,8} for the third field)</p>
  
  <p>My question is: can I repeat only one step of the macro several times (and the rest of the macro only 1 repetition)?</p>
  
  <p>I've read the wiki related to this point (<a href="http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Editing_Configuration_Files#.3CMacros.3E" rel="nofollow">http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Editing_Configuration_Files#.3CMacros.3E</a>) and I don't found anything neither</p>
  
  <p>If not possible, how could be a good solution? Create another 2 different macros and after execute the main one, execute this new 2 macros several times?</p>
  
  <p>Thanks in advance!</p>