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

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

objective c - how Set autolayout for multiple dynamic buttons and labells in iOS? -