Vidyalelo
Ruby Programming · all questions

Regular Expressions in Ruby
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

26

Questions

2/2

Page

Pick an option on a question to see the right answer and solution.

Which metacharacter is used to specify grouping in a regular expression in Ruby?

Select an option to see the answer and solution.

Which modifier is used to perform single-line matching in Ruby regular expressions?

Select an option to see the answer and solution.

What does the (?<=...) construct represent in a regular expression in Ruby?

Select an option to see the answer and solution.

Which method is used to split a string into substrings based on a regular expression in Ruby?

Select an option to see the answer and solution.

What does the (?<!...) construct represent in a regular expression in Ruby?

Select an option to see the answer and solution.

Which metacharacter is used to specify the beginning of a line in a regular expression in Ruby?

Select an option to see the answer and solution.