[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How to parse quoted text?



At 13.46 97/2/25, Louis Chretien wrote:
>add telecom "856473" "Louis Chretien" "" "Administrator"

Not a MacPerl question, but:

$line = 'add telecom "856473" "Louis Chretien" "" "Administrator"';
while ($line =~ /"(.*?)"/g) {push @values, $1}
print join(', ',@values);

Again, please direct general Perl questions to comp.lang.perl.misc.

Hope this helps,

#================================================================
Chris Nandor                                      pudge@pobox.com
PGP Key 1024/B76E72AD                           http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6