Get a text beside a qoute using regex -


this text

"this quote"

the output must be

"this quote"

so getting word beside qoute

so far regex code

"\s*(.*?)\s*" 

but getting string inside quote

you can use regex match word next or before double quote:

"\s*\s+|\s+\s*" 

regex demo

your regex "\s*(.*?)\s*" match text between quotes , optional whitespaces.


Comments

Popular posts from this blog

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -