in reply to String parameter parsing
(tested)while ($content =~ m/<\?Function\(([^\)]*)\)\?>/g) { my $params = $1; my @params = $params =~ m/"([^"]*)"/g; my $line = some_param_stuff(@params); }
The regex I use to match the individual parameters assumes that there will be no escaped quotes within a parameter. (e.g. "my \"tricky\" parameter".)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: String parameter parsing
by Beatnik (Parson) on Jan 19, 2001 at 03:19 UTC | |
by chipmunk (Parson) on Jan 19, 2001 at 03:31 UTC | |
by Beatnik (Parson) on Jan 19, 2001 at 14:34 UTC |