Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Parsing data

From: office::thousand-hills::net at: 8-Oct-2001 12:56

In reading data from a file by lines, I use this code to parse and reorder the data line by line. So far -so good. The code works, but how can I make it reject the first two and last two elements in the data line, and rejoin the rest? John ----Quote--- makerow: func [s [string!] /local row] [ row: copy {<tr bordercolor="lightblue" border="3" bgcolor="snow">} foreach t parse s none [ either t = "--" [replace t "--" "0:00"] [ "" ] ;either t = "G" [replace t "G" #"^(null)" ] [ "" ] append row rejoin [ "^/" <td width="6%" align="center"><font face=arial size=2 color=black> nicetime to-time t </font></td> ] ] rejoin [row "^/" </tr>]