> Can't you tell that more easily by seeing if match-beginning returns nil?
Which match-beginning? One for a subexpression inside the alternative you're trying to test for. After (string-match "\\(a\\)\\|\\(b\\)\\|\\(c\\)" input) I can just consult (length (match-data)) for distinguishing between all three alternatives. You could, but you'd have to compare the value of that against various constants, which would be ugly. I think this code is cleaner: (cond ((match-beginning 1) ...) ((match-beginning 2) ...) ((match-beginning 3) ...) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel