Skip to content

Instantly share code, notes, and snippets.

Created September 21, 2014 20:17
Show Gist options
  • Save anonymous/a2da9408eb7bf62ed2ca to your computer and use it in GitHub Desktop.
Save anonymous/a2da9408eb7bf62ed2ca to your computer and use it in GitHub Desktop.
puts "Text to search through: "
text = gets.chomp
puts "Word to redact: "
redact = gets.chomp
words = text.split ""
words.each do |word|
end
if word == redact
print "REDACTED "
else
print word + " "
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment