Is there some weirdness involved in the interaction
between parens and the '?' operator? It looks as
if an optional parenthesised group can vanish completely
from the results. Here's an example of what I mean:
Welcome to the STk interpreter version 3.99.4 [Linux-2.X-ix86]
Copyright © 1993-1999 Erick Gallesio - I3S - CNRS / ESSI <eg_at_unice.fr>
STk> (define re (string->regexp "^(xx)?(A*)$"))
re
; Now, as I understand it, re should always return either
; #f or a list of three elements
STk> (re "ZZZ")
#f
; good
STk> (re "x")
#f
; good
STk> (re "xx")
((0 2) (0 2) (2 2))
; very good
STk> (re "xxAAA")
((0 5) (0 2) (2 5))
; very very good
STk> (re "A")
((0 1))
; eek!
Received on Fri May 28 1999 - 09:59:10 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST