Guest User

Untitled

a guest
Dec 15th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. words = ["hello", ", ", "world", "!"]
  2. array = []
  3. words.each do |a|
  4. array << a if /w/.match(a)
  5. end
  6.  
  7. puts array
  8.  
  9. hello
  10. world
Add Comment
Please, Sign In to add comment