Examveda
Examveda

Which method is used to replace occurrences of a pattern in a string with a specified string in Ruby?

A. String#modify

B. String#sub

C. String#gsub

D. String#replace

Answer: Option C


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

Join The Discussion

Related Questions on Regular Expressions in Ruby