From ... From: Erik Naggum Subject: Re: Parsing a simple string Date: 1997/03/11 Message-ID: <3067028325983943@naggum.no>#1/1 X-Deja-AN: 224524756 References: mail-copies-to: never Organization: Naggum Software; +47 2295 0313; http://www.naggum.no Newsgroups: comp.lang.lisp * Hrvoje Niksic | I'm doing my first steps in CL programming, and have found an obstacle. | I have a file of the following format: | | string number | ... | | That is, each lines looks something like "foo 5" (the delimiter is one | SPC character). I know how to read lines from the file using | `read-line', but I'd like to parse the string as to get the string "foo" | and number 5. What's the best way to do it? Any pointers? since the delimiter is a single space, let's exploit that. (position #\Space ) yields its position. (subseq 0 ) yields the string. (parse-integer :start ) yields the number. #\Erik -- how to beat Microsoft, death, and poverty: in July 1994, there were more references to my name (3039) in gopherspace than to Microsoft (2557), death (2530), and poverty (2410). (http://veronica.sonoma.edu:8001/top1000.html)