Regexp - (Quantifier|Cardinality Indicators)

> Procedural Languages > Multilingual Regular Expression Syntax (Pattern)

1 - About

A quantifier defines the number of times that:

may be seen.


3 - Algorithm / Behaviors

It has three behaviors:

  • a Greedy one: match longest possible string. This is the default regular expression behavior.
  • a Lazy one: match shortest possible string. Match as few as possible, repeat as few times as possible
  • a Possessive one.