Created
March 9, 2013 00:07
-
-
Save twtw/5121548 to your computer and use it in GitHub Desktop.
parse nations rank in Natixis Global Retirement Index http://ngam.natixis.com/docs/12/1010/Global_Retirement_Index,0.pdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# _*_ encoding: utf-8 _*_ | |
# parse nations rank in http://ngam.natixis.com/docs/12/1010/Global_Retirement_Index,0.pdf | |
line=File.readlines('./rank.txt').map(&:chomp)[0] | |
hash = {} | |
@index = 1 | |
line.split(/(\d+)/).each do |x,i| | |
unless x.to_i.zero? | |
@index = x.to_i | |
else | |
hash[@index] = x | |
end | |
end | |
hash.each{|k,v| puts "#{k} -> #{v}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 Norway 2 Switzerland 3 Luxembourg 4 Sweden 5 Austria 6 Finland 7 Netherlands 8 Denmark 9 Germany 10 France 11 Australia 12 Israel 13 Canada 14 Belgium 15 Japan 16 Slovenia 17 Czech Republic 18 Slovakia 19 United States 20 United Kingdom 21 Italy 22 New Zealand 23 Iceland 24 Cyprus 25 Spain 26 Malta 27 Korea, Rep. 28 Singapore 29 Panama 30 United Arab Emirates 31 Costa Rica 32 Portugal 33 Greece 34 Uruguay 35 Croatia 36 Poland 37 Chile 38 Lithuania 39 Kuwait 40 Brazil 41 Argentina 42 Mexico 43 Estonia 44 Mauritius 45 Hungary 46 Saudi Arabia 47 Belarus 48 Ireland 49 Malaysia 50 Qatar 51 Ecuador 52 El Salvador 53 Lebanon 54 Cuba 55 Albania 56 Belize 57 Peru 58 Romania 59 Turkey 60 Jordan 61 Bulgaria 62 Guatemala 63 Thailand 64 Venezuela 65 Latvia 66 Kazakhstan 67 Paraguay 68 Jamaica 69 Dominican Republic 70 Russian Federation 71 Bolivia 72 Ukraine 73 China 74 Tunisia 75 Serbia 76 Moldova 77 Colombia 78 Kyrgyzstan 79 Vietnam 80 Armenia 81 Macedonia, FYR 82 Philippines 83 Guyana 84 Indonesia 85 Trinidad and Tobago 86 Iran, Islamic Rep. 87 Morocco 88 Libya 89 Georgia 90 Botswana 91 Sri Lanka 92 Bahrain 93 Azerbaijan 94 Egypt, Arab Rep. 95 Nicaragua 96 Bosnia and Herzegovina 97 Honduras 98 Algeria 99 South Africa 100 Laos 101 India 102 Syrian Arab Republic 103 Mongolia 104 Uganda 105 Uzbekistan 106 Cameroon 107 Pakistan 108 Cambodia 109 Rwanda 110 Zambia 111 Ghana 112 Bangladesh 113 Kenya 114 Senegal 115 Iraq 116 Tanzania 117 Tajikistan 118 Nepal 119 Malawi 120 Nigeria 121 Myanmar 122 Djibouti 123 Burkina Faso 124 Benin 125 Burund 126 Cote d'Ivoire 127 Congo, Rep. 128 Central African Republic 129 Angola 130 Haiti 131 Namibia 132 Yemen, Rep. 133 Sudan 134 Ethiopia 135 Madagascar 136 Mauritania 137 Chad 138 Mozambique 139 Lesotho 140 Guinea 141 Togo 142 Turkmenistan 143 Niger 144 Afghanistan 145 Mali 146 Liberia 147 Sierra Leone 148 Comoros 149 Congo, Dem. Rep. 150 Zimbabwe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment