I am trying to build a regex to find a string in ruby
str = "foo"
I want to stop trying to find the string after it finds the closing quotation mark. I also want to keep quotes so that I can output the string I found as:
puts "the string is:" + str
=> the string is: "foo"
I am new to using regular expressions.
source
share