From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.help Subject: Re: How to parse a string? Date: Wed, 30 Apr 2003 18:54:20 -0700 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87ade7d023.fsf@noos.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" ; format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1051754357 19317 80.91.224.249 (1 May 2003 01:59:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 1 May 2003 01:59:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 01 03:59:16 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19B3Lw-00051P-00 for ; Thu, 01 May 2003 03:59:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19B3Mg-0007eg-00 for gnu-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2003 22:00:02 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19B3Lv-00070Q-00 for help-gnu-emacs@gnu.org; Wed, 30 Apr 2003 21:59:15 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19B3JB-0005AX-00 for help-gnu-emacs@gnu.org; Wed, 30 Apr 2003 21:56:26 -0400 Original-Received: from renfield.synergymicro.com ([153.105.4.30] helo=synergymicro.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19B3Hp-0004Pu-00 for help-gnu-emacs@gnu.org; Wed, 30 Apr 2003 21:55:01 -0400 Original-Received: from synergy.synergy.encinitas.ca.us ([153.105.4.29]) by synergymicro.com (8.9.3/8.9.3) with ESMTP id SAA22359 for ; Wed, 30 Apr 2003 18:56:24 -0700 Original-Received: from [198.17.100.22] (G_Hill_Mac [198.17.100.22]) h4122OoJ022054 for ; Wed, 30 Apr 2003 19:02:25 -0700 In-Reply-To: <87ade7d023.fsf@noos.fr> Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9100 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9100 At 1:42 AM +0200 5/1/03, Fran=E7ois 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