[Chicken-users] Regex fail?

2015-10-29 Thread Matt Welland
(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

Re: [Chicken-users] Regex fail?

2015-10-30 Thread Peter Bex
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: #;

Re: [Chicken-users] Regex fail?

2015-10-30 Thread John Cowan
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

Re: [Chicken-users] Regex fail?

2015-11-01 Thread Alex Shinn
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