So I'm trying to write a simple caesar cipher which has been done 100 times, but I seem to be having a problem with backslashes in my alphabet. Can anyone tell me why in this simple code, the backslash is shifting? http://pastebin.com/D2XumDNP
I'm trying to refactor some ugly code. Can anyone prettify this? configs.grep(/http_username=(\S+)/i).match(/http_username=(\S+)/i) it's essentially reading through an array (configs) and just pulling out the value of the http_username=asdf for the single item in the array named "http_username"
bnagy: That returns an array with a nil for every item in the original array that doesn't match, and then matches on the 1 config value properly. I'd then have to remove all nil values