Q. What does the =~ operator do in Ruby when used with regular expressions?

  • (A) Evaluates the regular expression
  • (B) Compares two regular expressions
  • (C) Matches a string against a regular expression
  • (D) Assigns a regular expression to a string
πŸ’¬ Discuss
βœ… Correct Answer: (C) Matches a string against a regular expression

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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