Guest User

Untitled

a guest
May 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. >> a.scan(/\=(\d+)/).each { |match| puts match }
  2. 31
  3. 32
  4. 34
  5. 33
  6. => [["31"], ["32"], ["34"], ["33"]]
  7. >> a.scan(/\=(\d+)/).each { |match| puts match.class }
  8. Array
  9. Array
  10. Array
  11. Array
  12. => [["31"], ["32"], ["34"], ["33"]]
  13. >> a.scan(/\=(\d+)/).each { |match| puts match.first.class }
  14. String
  15. String
  16. String
  17. String
  18. => [["31"], ["32"], ["34"], ["33"]]
  19. >> a.scan(/\=(\d+)/).each { |match| puts match.first }
  20. 31
  21. 32
  22. 34
  23. 33
  24. => [["31"], ["32"], ["34"], ["33"]]
  25. >>
Add Comment
Please, Sign In to add comment