Q. Which method is used to extract all occurrences of a pattern in a string in Ruby?

  • (A) String#scan
  • (B) String#extract
  • (C) String#find_all
  • (D) String#match_all
πŸ’¬ Discuss
βœ… Correct Answer: (A) String#scan

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
180
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate