Skip to content

Instantly share code, notes, and snippets.

@hosiawak
Created August 18, 2009 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hosiawak/169699 to your computer and use it in GitHub Desktop.
Save hosiawak/169699 to your computer and use it in GitHub Desktop.
irb(main):030:0> src
=> "\n\t \t\nta\t\nsk: dupa\n\tdupa2"
irb(main):031:0> src.gsub(/[\n\t ]*(\w+)[\n\t]*(\w+): (\w+)([\n\t])+(\w+)/, '\1\2: \3\4\5')
=> "task: dupa\tdupa2"
irb(main):032:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment