From: globalrev Date: 2008-05-08T21:55:05+09:00 Subject: Re: Check if char in string? ty all for the help. haesob park did what iw anted. this is the program i wrote, it is an encrypter/decrypter for the robbers language(rövarspråket in swedish), its from the book Kalle Blomkvist by late and very famous author Astrid Lindgren. you add o + the consonant, nothing is done to vowels. so d becomes dod, a is just a. dad is therefore dodadod, super is sosupoperor etc. puts "Enter sentence to encrypt: " str = gets enc = "" for x in (0..str.length()-1) if str[x].chr =~ /[qwrtpsdfghjklzxcvbnm]/ enc = enc + str[x].chr + "o" + str[x].chr else enc = enc +str[x].chr end end print enc puts "Enter code to decrypt: " code = gets x = 0 dec = "" while (x