This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

error when using split-regex


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]