Same as string insertion.
if goo =~ /#{Regexp.quote(foo)}/
#...
More Related Contents:
- Write regular expressions [closed]
- Get all three digit numbers from array and store in new array [closed]
- /^a-eg-h/.match(‘f’) gives null in Ruby
- Regex to match Date
- Difference between \A \z and ^ $ in Ruby regular expressions
- How to match all occurrences of a regex
- Ruby regular expression using variable name
- How do I get the match data for all occurrences of a Ruby regular expression in a string?
- How do I remove emoji from string
- Weird backslash substitution in Ruby
- Valid email address regular expression? [duplicate]
- Extract a substring from a string in Ruby using a regular expression
- Ruby Regular expression to match a url [duplicate]
- How to match all occurrences of a regular expression in Ruby
- Regex to split BBCode into pieces
- What do `?i` and `?-i` in regex mean?
- Confusion with Atomic Grouping – how it differs from the Grouping in regular expression of Ruby?
- Ruby Email validation with regex
- What is a regex to match a string NOT at the end of a line?
- Match a string against multiple patterns
- Matching balanced parenthesis in Ruby using recursive regular expressions like perl
- Ruby: filter array by regex?
- How to use double brackets in a regular expression?
- How to match something with regex that is not between two special characters?
- Why is `a = a` `nil` in Ruby?
- How to get a specific output iterating a hash in Ruby?
- When to use each method of launching a subprocess in Ruby
- Ruby run shell command in a specific directory
- Read, edit, and write a text file line-wise using Ruby
- What will give me something like ruby readline with a default value?