Skip to content

Instantly share code, notes, and snippets.

@doombongo
Created January 15, 2013 08:33
Show Gist options
  • Save doombongo/4537229 to your computer and use it in GitHub Desktop.
Save doombongo/4537229 to your computer and use it in GitHub Desktop.
text = "bIg mouse"
redacted = "big"
words = text.split(" ")
words.each do |word|
if word != redacted
print word + " "
else
print "REDACTED "
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment