[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Regex parenthesis handling bug
From: |
Neil Jerram |
Subject: |
Regex parenthesis handling bug |
Date: |
21 Oct 2001 11:18:50 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
According to the libc manual, all libc regex settings default to the
Emacs behaviour, so unquoted parens should match literal parens in the
match string, while quoted parens indicate grouping.
In Guile, it doesn't work like this...
guile> (string-match "\\(x\\)" "x")
$3 = #f
guile> (string-match "x" "x")
$4 = #("x" (0 . 1))
guile> (string-match "(x)" "x")
$5 = #("x" (0 . 1) (0 . 1))
guile> (string-match "(x)" "(x)")
$7 = #("(x)" (1 . 2) (1 . 2))
guile> (string-match "\\(x\\)" "(x)")
$8 = #("(x)" (0 . 3))
guile>
I don't think this is a Guile bug, because Guile's regex functions
fall straight through to libc. Does anyone know if this is a known
libc bug, and whether there is a nice workaround?
Thanks,
Neil
- Regex parenthesis handling bug,
Neil Jerram <=
- Re: Regex parenthesis handling bug, Gary Houston, 2001/10/21
- Re: Regex parenthesis handling bug, Neil Jerram, 2001/10/23
- Re: Regex parenthesis handling bug, Neil Jerram, 2001/10/24
- Re: Regex parenthesis handling bug, Rob Browning, 2001/10/24
- Re: Regex parenthesis handling bug, Thien-Thi Nguyen, 2001/10/24
- Re: Regex parenthesis handling bug, Thien-Thi Nguyen, 2001/10/24