I want to make a match to any text between quotes that is between a couple of specific tags, for example Code:
codigo cualquiera 1
[begin]
"hola" <--- match a este
123
hola "hola" <-- math a este otro
[end]
[otro]
"hola" <--- a este no
[otro]
The regular expression I want to help me is one that can capture the text "hola"
(with double quotes) that are within the [begin]
and [begin]
but not the hola
that is not enclosed in double quotes .
I tried:
[begin](\s*|.*)|".*"(\s*|.*)*[end]
This captures all the content between [begin]
and [end]
, but what I'm looking for is to capture any text that is enclosed in double quotes.