# Re: changing the spacing in a string?

**URL:** <https://www.ruby-forum.com/t/re-changing-the-spacing-in-a-string/193072>\
**Category:** Ruby\
**Created:** [August 10, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/re-changing-the-spacing-in-a-string/193072 "2010-08-10T19:34:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_ESSavard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@Joseph\_ESSavard](https://www.ruby-forum.com/u/Joseph_ESSavard)\
**Post date:** [August 10, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/re-changing-the-spacing-in-a-string/193072/1 "2010-08-10T19:34:37Z")

</div>

str = Array.new  
str \<\< “gm-notify 0.10.2-1~ppa1 AlexanderHungenberg (2010-05-05)”  
str \<\< “gm-notify 0.9-0~ppa6 TomVetterlein (2009-05-15)”  
str \<\< “gm-notify 0.10.2-1~ppa1 AlexanderHungenberg (2010-05-13)”  
str \<\< “gm-notify 0.9+r39-1~ppa1 SeanStoops (2009-12-22)”  
str \<\< “gm-notify 0.9-0~ppa7 NikolaKovacs (2009-09-27)”  
str \<\< “gm-notify 0.8-0ppa2 TomVetterlein (2009-04-27)”

str.each { |s|  
s.split.each { |f|  
print(format("%25s", f.to\_s))  
}  
puts “”  
}

Im sure theres a cleaner way but this way you can play with it.
