Skip to content

Instantly share code, notes, and snippets.

@wavebeem
Created January 13, 2011 06:42
Show Gist options
  • Save wavebeem/777498 to your computer and use it in GitHub Desktop.
Save wavebeem/777498 to your computer and use it in GitHub Desktop.
lukeyb
#!/usr/bin/ruby
data = DATA.read
data.gsub! '\:', "\0"
pieces = data.split ":"
pieces.each do |piece|
piece.gsub! "\0", '\:'
end
puts pieces
__END__
5082333~GBP~ACTIVE~0~1~NR\: (RSA) <br>8. Fan Mail (0%,11\:07), 6(2.5%,11\:08)~true~5.0~1162835723938~6. Earlswood,9.08,2.5;8. Fan Mail,9.07,2.4;Y:1058616~0~6.04~8.4~~11.9~false||:670160~1~6.18~17.5~~4.2~false||:113 2008~2~9.78~5.2~~20.4~false||:894820~3~140.02~4.6~~20.4~false||1.01~5.0~B~1~:1414415 ~4~8.2~6.2~~16.0~false||:575636~5~5.54~11.5~~8.6~false||:1433455~6~0.0~~~0.4~false|| :1433456~7~0.0~~~0.9~false||:746753~8~5.54~11.5~~5.2~false||:1433457~9~0.0~~~4.2 se||:1147548~10~0.0~~~2.6~false||:1433458~11~62.46~2.0~~3.5~false||:1433459~12~0.0~~ ~ 0.9~false||:1433460~13~0.0~~~0.9~false||
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment