[ << ] | [ < ] | [ 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 March 31, 2014 using texi2html 5.0.