Opened 12 years ago
Closed 11 years ago
#984 closed defect (fixed)
irregex documentation example for irregex-search does not match implementation
Reported by: | Christian Kellermann | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.9.0 |
Component: | extensions | Version: | 4.8.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
The docs for irregex-search imply that an case-insensitive search is possible by passing the symbol 'i as third argument. This seems to be wrong:
#;1> (use irregex) #;2> (irregex-search "foobar" "abcFOOBARdef" 'i) Error: (irregex-search) not an exact integer: i
This happened with
; csi CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (rev 623c46b) openbsd-unix-gnu-x86 [ manyargs dload ptables ] compiled 2013-02-03 on necronomicon.my.domain (OpenBSD)
Attachments (1)
Change History (6)
comment:1 follow-up: 3 Changed 12 years ago by
Changed 11 years ago by
Attachment: | 0001-Fix-irregex-search-example-with-i-case-insensitive-o.patch added |
---|
comment:3 Changed 11 years ago by
Replying to ckeen:
My uneducated guess is that this should read
(irregex-search (irregex "foobar" 'i) "abcFOOBARdef")
I think that's right (and that's what's used in an example later in the docs, as well). I sent this change to Alex, so we can... Wait for that to be applied? Or just go ahead and change the docs, I dunno. Here's a patch for the manual either way.
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This change was accepted upstream. I also noticed another case where our docs don't match irregex proper's, which has the correct version:
-(irregex-search '(: "match" (? "es") "!") "matche!") => #<match> +(irregex-search '(: "match" (? "es") "!") "matche!") => #f
Because these are trivial fixes, I've gone ahead and pushed them to the manual, so this can be closed.
I also noticed two cases where both our unit and irregex proper don't behave like the docs say they should: #1064 #1065
My uneducated guess is that this should read