Examveda
Examveda

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

Answer: Option C


This Question Belongs to Ruby Programming >> Regular Expressions In Ruby

Join The Discussion

Related Questions on Regular Expressions in Ruby