D
david.karr
I'm preparing a presentation about regular expressions to a group of my
colleagues. I'm looking for examples of expressions using the
"reluctant" quantifier (the "?"). I'm not asking about the syntax,
just real (or simulated) examples of why you would want to use this.
Note that I'm not referring to using this on "simple" expressions, like
"a?", but on already quantified expressions, like "a+?" or "a*?", or
even "a{n}?". I wouldn't even mention the latter one, as it doesn't
seem to make sense to me, but it's used as an example (with no real
explanation) in the "perlre" documentation page.
colleagues. I'm looking for examples of expressions using the
"reluctant" quantifier (the "?"). I'm not asking about the syntax,
just real (or simulated) examples of why you would want to use this.
Note that I'm not referring to using this on "simple" expressions, like
"a?", but on already quantified expressions, like "a+?" or "a*?", or
even "a{n}?". I wouldn't even mention the latter one, as it doesn't
seem to make sense to me, but it's used as an example (with no real
explanation) in the "perlre" documentation page.