Question in Regular expression,

Hi Please consider the below question

a='djfdlskfjsdfklsdjfdlkfjd["dfdf  dfdfd"]'

puts a[/".*"/]

It gives the output as

“dfdf dfdfd” But I don’t want this double quote in the end result, I
have to do this through Regular expression, Is it possible?

hi Jesus,

Thank you very much, Since you gave me the clue about capturing clue, I
got another way too

puts a[/"(.*)"/,1]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs