SonicWang has asked for the wisdom of the Perl Monks concerning the following question:
I want to substract a wanted section between {}, like:
void fo { ........ { //first one f = fopen(...); ....... if(...) { } } //mapping one ........ }
and I want to get the <fopen> belonged {}:
How to get it? use m/({[^{]*fopen.*)/ can get the first { to fopen, but how to get the mapping }? Thanks a lot.{ //first one f = fopen(...); ....... if(...) { } } //mapping one
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: a question about re
by Eliya (Vicar) on Apr 28, 2011 at 15:12 UTC | |
|
Re: a question about re
by moritz (Cardinal) on Apr 28, 2011 at 15:04 UTC | |
|
Re: a question about re
by wind (Priest) on Apr 28, 2011 at 17:50 UTC | |
|
Re: a question about re
by wind (Priest) on Apr 29, 2011 at 03:55 UTC |