Vidyalelo
Ruby Programming · Q1

Regular Expressions in Ruby

Programming · Ruby Programming · question 1

Q1

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
Answer
D.
Assigns a regular expression to a string

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board