manpagez: man pages & more
info bigloo
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.2.10 Non-capturing clusters

It is often required to specify a cluster (typically for quantification) but without triggering the capture of submatch information. Such clusters are called non-capturing. In such cases, use (?: instead of ( as the cluster opener. In the following example, the non-capturing cluster eliminates the “directory” portion of a given pathname, and the capturing cluster identifies the basename.

 
(pregexp-match "^(?:[a-z]*/)*([a-z]+)$" 
  "/usr/local/bin/mzscheme")
 ⇒ ("/usr/local/bin/mzscheme" "mzscheme")

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.