denap has asked for the wisdom of the Perl Monks concerning the following question:
I've since discovered that the arg lists in question *might* themselves contain function calls. i.e.# my %translate = ( # funca => [ qr/funca\( ([^,]+) , ([^,]+) ,([^,]+) ,([^)]+) \)/x, # '"func($1,$2,XXX,YYY,$4)"' ], # funcb => [ qr/funcb\( ([^,]+) , ([^,]+) ,([^,]+) ,([^)]+) \)/x, # '"func($1,$2,,,$4)"' ], #);
I cannot figure out how to break the regex so that it gathers funcH(A,B,C) as a single arg. Unfortunately, these embedded functions might occur in any arg position. thoughts? thanks.funca(1,2,funcH(A,B,C),3)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex assistance for parsing arg list
by ihb (Deacon) on Feb 04, 2003 at 19:14 UTC | |
by denap (Initiate) on Feb 04, 2003 at 19:25 UTC | |
|
Re: regex assistance for parsing arg list
by Enlil (Parson) on Feb 04, 2003 at 19:26 UTC | |
by ihb (Deacon) on Feb 04, 2003 at 19:45 UTC |