[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiple delimiters
In article <39C09FE1.C9E0B54@dkrz.de>, Martin Schultz <email@example.com> writes:
>> Has anyone nutted out a way to read ASCII files with multiple
>> delimiters? Our current solution involves some messy string operations
>> that are restricted to 5.3, and I/O operations we would like to avoid.
>> Am I asking the impossible?
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>1. Read the file line by line as strings
>2. use my StrRepl function to replace all delimiters with one value
> line = StrRepl(line, ';',' ')
> line = StrRepl(line, ',',' ')
> line = StrRepl(line, ':',' ')
>3. Use ReadS, Str_Sep or StrSplit (5.3) to extract the numbers.
>Caution: With Str_Sep or StrSplit you should always add a
>You can find StrRepl at
Or, you can use my STRPARSE, which takes any number of delimiters.
Mati Meron | "When you argue with a fool,
firstname.lastname@example.org | chances are he is doing just the same"