Re: READ and delimited format




Beliavsky wrote:
Jeremy wrote:
Is it possible to use READ to read a delimited file? i.e.:

JOHN|DOE|123 MAIN ST.|SMALLTOWN|NJ|USA
JOE|SMITH|1 S. MAIN ST. APT 25|BIGTOWN|CA|USA

With a little work, yes. If you want to store the characters between
"|" in separate strings, you can

(1) Read each line into a large string with an "internal read"

read (iunit,"(a)") text

(2) Loop through "text" to determine the positions of the the
delimiters.
....

And INDEX() intrinsic may be of help here.

.



Relevant Pages

  • Regular expression to split a long string
    ... I have a web form that has a multiline input box 30 columns by 15 rows. ... maximum length of a user's entry can be 450 characters. ... I need to accept the user's entry in this textbox and split it into ... but I can't get the separate strings. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Regular expression to split a long string
    ... > I have a web form that has a multiline input box 30 columns by 15 rows. ... > maximum length of a user's entry can be 450 characters. ... > but I can't get the separate strings. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: java regex split
    ... can store the names,cities and emails in separate strings. ... With Java 1.4 and above you could use the split function of the String ...
    (comp.lang.java.programmer)
  • Regular Expression Help please
    ... I need a regular expression that parses a stream of up to 450 characters ... into 15 separate strings of up to 30 characters each. ... Ideally, the regex will "word wrap" that is, not break in the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: java regex split
    ... can store the names,cities and emails in separate strings. ... With Java 1.4 and above you could use the split function of the String ...
    (comp.lang.java.programmer)