From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13317 invoked by alias); 9 Mar 2017 19:43:17 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 12848 invoked by uid 89); 9 Mar 2017 19:43:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Mar 2017 19:43:06 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cm3xo-0000Lq-1V; Thu, 09 Mar 2017 20:43:04 +0100 Received: from 70-36-239-163.dsl.dynamic.fusionbroadband.com ([70.36.239.163] helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1cm3xS-0005A8-Lr; Thu, 09 Mar 2017 20:42:42 +0100 Subject: Re: error when using split-regex To: Damien MATTEI , kawa References: <201703091131.24188.Damien.Mattei@unice.fr> From: Per Bothner Message-ID: <20d18612-1193-142a-5db1-ae765f268c5e@bothner.com> Date: Thu, 09 Mar 2017 19:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201703091131.24188.Damien.Mattei@unice.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00061.txt.bz2 On 03/09/2017 02:31 AM, Damien MATTEI wrote: > Hi, > > i have got an error in code when using regex-split, > here is the code tested here at REPL in kawa 2.1: > > (require 'regex) > > (define wds-url "http://ad.usno.navy.mil/wds/Webtextfiles/wdsnewref.txt") > (define wds-data-str &<{&[wds-url]}) ;; could take a few seconds to GET file > (define wds-data-str-split (regex-split wds-data-str (string #\return))) Try switching the order of the arguments to regex-split. -- --Per Bothner per@bothner.com http://per.bothner.com/