Code: puts ARGF.read.scan(/[A-Z1-9]{5}-[A-Z1-9]{5}-[A-Z1-9]{5}-[A-Z1-9]{5}-[A-Z1-9]{5}/) puts is a method that writes to STDOUT with a carriage return at the end. ARGF is a stream that process files given as command-line arguments or passed in via STDIN. read is a method that reads in an entire file as a string. scan is a method that searches through a string for a given regular expression. /[A-Z1-9]{5}-[A-Z1-9]{5}-[A-Z1-9]{5}-[A-Z1-9]{5}-[A-Z1-9]{5}/ is a regular expression that matches Windows product keys. So, placing a file named productkeyfind.rb containing the code snippet into the same folder as a file named produtkeyin.txt that contains at least one Windows product key lets you do: Code: ruby productkeyfind.rb productkeyin.txt > productkeysout.txt This will create a file named productkeysout.txt that contains each product key found in the input file on a separate line. If you (or anyone else) has any more questions, please, just let me know