On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey <[email protected]> wrote:
> On 10-11-16 04:07 PM, Vincent Li wrote:
>>
>> My aim is to remove specific profile.*{} block from that file
>
> Yes, but if the {} blocks are nestable, then you can't do it with regular
> expressions alone.
>

right, I only have one level nested {}, any tips? when file is slurped
to file mode, the nested {} will look like 'profile foo  { foo  { foo
} foo  }profile bar  { bar  { bar } bar  }profile goo { goo } ', I
tried regex:

{.*?(?:{.*?})?.*?}

but it is not working.

Vincent

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to