newLISP Fan Club

Forum => newLISP in the real world => Topic started by: kanen on March 15, 2012, 11:19:43 PM

Title: (parse x {\n}) vs (parse x "\n")
Post by: kanen on March 15, 2012, 11:19:43 PM
The title says it all.



I have a file called "foo"
foo
bar
baz
bif
doodle


> (length (parse (read-file "foo") "n"))
6
> (length (parse (read-file "foo") {n}))
1


What am I missing in this behavior?
Title: Re: (parse x {\n}) vs (parse x "\n")
Post by: Lutz on March 15, 2012, 11:41:54 PM
Quoting with the curly brackets suppresses the backslash escape effect for special characters. See str in:



http://www.newlisp.org/downloads/newlisp_manual.html#type_ids