From: Damien MATTEI <Damien.Mattei@unice.fr>
To: kawa <kawa@sourceware.org>
Subject: error when using split-regex
Date: Thu, 09 Mar 2017 10:31:00 -0000 [thread overview]
Message-ID: <201703091131.24188.Damien.Mattei@unice.fr> (raw)
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)))
result in this error at some point of splitting:
^
at java.util.regex.Pattern.error(Pattern.java:1955)
at java.util.regex.Pattern.sequence(Pattern.java:2123)
at java.util.regex.Pattern.expr(Pattern.java:1996)
at java.util.regex.Pattern.group0(Pattern.java:2905)
at java.util.regex.Pattern.sequence(Pattern.java:2051)
at java.util.regex.Pattern.expr(Pattern.java:1996)
at java.util.regex.Pattern.compile(Pattern.java:1696)
at java.util.regex.Pattern.<init>(Pattern.java:1351)
at java.util.regex.Pattern.compile(Pattern.java:1028)
at kawa.lib.kawa.regex.regexSplit(regex.scm:51)
at atInteractiveLevel-6.run(stdin:6)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:293)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:212)
at kawa.Shell.run(Shell.java:291)
at kawa.Shell.run(Shell.java:203)
at kawa.Shell.run(Shell.java:184)
at kawa.repl.processArgs(repl.java:687)
at kawa.repl.main(repl.java:793)
also tested it with #\linefeed and same error, also tested with " " and "A" : error
i did not look in the contain of the file and i will do it,but anyway the result should not be an error?
does the newest version of kawa give a different result?
Regards,
Damien
--
Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS
next reply other threads:[~2017-03-09 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 10:31 Damien MATTEI [this message]
2017-03-09 17:57 ` Per Bothner
2017-03-09 19:43 ` Per Bothner
2017-03-09 19:46 ` Per Bothner
2017-03-10 9:44 ` Damien MATTEI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201703091131.24188.Damien.Mattei@unice.fr \
--to=damien.mattei@unice.fr \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).