(string-match "^([^\n]*)(\n.*|).*$" "This\nis \n")
=> #f
Using Ruby as comparison:
irb(main):001:0> "This\nis \n".match(/^([^\n]*)(\n.*|)$/)
=> #
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-u
On Thu, Oct 29, 2015 at 09:12:44PM -0700, Matt Welland wrote:
> (string-match "^([^\n]*)(\n.*|).*$" "This\nis \n")
> => #f
>
> Using Ruby as comparison:
>
> irb(main):001:0> "This\nis \n".match(/^([^\n]*)(\n.*|)$/)
> => #
Interesting! This seems to be a problem in the way string->sre works:
#;
Peter Bex scripsit:
> Note the nonl, which the manual states is equivalent to ".", but of
> course nonl means "no newline".
Dot in regular expressions has *always* meant "match any character but a
newline". It doesn't come up that much in Unix commands, which typically
process their input line b
On Fri, Oct 30, 2015 at 10:01 PM, John Cowan wrote:
> Peter Bex scripsit:
>
> > Note the nonl, which the manual states is equivalent to ".", but of
> > course nonl means "no newline".
>
> Dot in regular expressions has *always* meant "match any character but a
> newline". It doesn't come up that