use strict; undef $/; my $text=<DATA>; my @array=(); @array=$text=~m#void xxx \(void\)(\{[^\{\}]+\})#gs; $"="\n"; print "@array"; __DATA__ void xxx (void){ #inside function 1 } void xxx (void){ #inside function 2 } void xxx (void){ #inside function 3 }
In reply to Re: pattern matching with brackets
by gopalr
in thread pattern matching with brackets
by eg8rds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |