On Mon, 21 Mar 2005,
wrote:
Vittal <> wrote:
>
>> I am trying to write a perl script which removes the contents
>> between two plain double quotes. (I am parsing C and C++ files.)
>> What I mean by plain is, double quote (") should not have been
>> preceeded by single quote (') or back slash(\).
>
> The following code does what you asked for, but I'm not convinced
> that it does what you want. I can easily construct text that will
> yield undesirable results.
The OP could also try the CPAN Text::Balanced module. The requirement
of a quoting single quote is just weird, but Text::Balanced can
probably handle it since it lets you specify any number of escape
characters.
Ted