How to extract text between quotes with regex in ruby -


I have the following string and I want to remove the text between the single quotes. The javascript function ('Mary D' Avignon ',' - ',' ',' 3 ')

The problem is solved for me alone quote (There can be many incidents of escape characters), so the match should be

  Mary D. Avignon - 3   

Support is appreciated < / P>

You can try regex below,

  (? & Lt; = ') (?: [^'] * \ \ ') + [^'] * (? = ')   

( ?: [^ '] * \\') + Regedx ensures that the quoted A quotation quote inside the string should be present.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

C++ Array Type Not Assignable in Copy Constructor -