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

13.2.5 Quantifiers

The quantifiers *, +, and ? match respectively: zero or more, one or more, and zero or one instances of the preceding subpattern.

(pregexp-match-positions "c[ad]*r" "cadaddadddr") ⇒ ((0 . 11))
(pregexp-match-positions "c[ad]*r" "cr")          ⇒ ((0 . 2))

(pregexp-match-positions "c[ad]+r" "cadaddadddr") ⇒ ((0 . 11))
(pregexp-match-positions "c[ad]+r" "cr")          ⇒ #f

(pregexp-match-positions "c[ad]?r" "cadaddadddr") ⇒ #f
(pregexp-match-positions "c[ad]?r" "cr")          ⇒ ((0 . 2))
(pregexp-match-positions "c[ad]?r" "car")         ⇒ ((0 . 3))

This document was generated on October 23, 2011 using texi2html 5.0.

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