help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to parse a string?


From: Greg Hill
Subject: Re: How to parse a string?
Date: Wed, 30 Apr 2003 18:54:20 -0700

At 1:42 AM +0200 5/1/03, François Fleuret wrote:
For instance, given a string which I know is composed of 5 fields of
type integer/integer/word/word/word, separated by spaces, how can I
transform this string into a list of the objects?

(let ((instring "10 20 wordA wordB wordC"))
  (setq instring (split-string instring))
  (append (list (string-to-number (pop instring))
                      (string-to-number (pop instring)))
               instring))

--Greg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]