Q. Which method is used to find the first occurrence of a pattern in a string in Ruby?

  • (A) String#search
  • (B) String#find
  • (C) String#find_pattern
  • (D) String#match
πŸ’¬ Discuss
βœ… Correct Answer: (D) String#match

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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