php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50812 What exactly does quantifier minimizer mean when it comes to the '?' meta char?
Submitted: 2010-01-20 23:40 UTC Modified: 2010-01-20 23:52 UTC
From: mdepuy at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2010-01-20 23:40 UTC] mdepuy at gmail dot com
Description:
------------
On the meta character description page for PCRE (http://php.net/manual/en/regexp.reference.meta.php), it notes that the '?' character is also 'also quantifier minimizer'.  Can anyone elaborate on exactly what this means?

Reproduce code:
---------------
---
From manual page: regexp.reference.meta
---
http://php.net/manual/en/regexp.reference.meta.php


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-20 23:51 UTC] svn@php.net
Automatic comment from SVN on behalf of degeberg
Revision: http://svn.php.net/viewvc/?view=revision&revision=293793
Log: Fixed bug #50812 (What exactly does quantifier minimizer mean when it comes to the '?' meta char?)
 [2010-01-20 23:52 UTC] degeberg@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

It simply means that it makes quantifiers ungreedy/lazy (it "minimizes" the number of characters matched). I've changed the wording in the manual.
 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of degeberg
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=d661690a9660751f9999a0b2f42c485d5f5829cb
Log: Fixed bug #50812 (What exactly does quantifier minimizer mean when it comes to the '?' meta char?)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC