Either I have a profound mis-understanding, or XEmacs (latest stable
and beta) has a bug in the regular expression handling:
(string-match "^\\|c" "")
0 ; ok
(string-match "\\(^\\|c\\)" "")
0 ; ok
(string-match "\\(?:^\\|c\\)" "")
nil ; wtf?
(string-match "\\(?:^\\|c\\)" "c")
0 ; ok
(string-match "\\(?:c\\|^\\)" "")
0 ; ok
;; and even
(string-match "\\(?:^\\)" "")
nil ; wtf?
; but
(string-match "\\(?:^\\)" "^")
0
In short, ^ seems to be mis-understood as a literal character when
immediately following a shy grouping open.
A few minutes later...
The offending code is at_begline_loc_p() in regex.c, which hasn't been
told about shy grouping.
If you like, I can propose a fix, but if somebody else knows the regex
code well (in particular all the bits that control syntax variations),
that would be better;-)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta