W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2016

[Bug 29817] Typo in reluctant qualifiers example

From: <bugzilla@jessica.w3.org>
Date: Mon, 12 Sep 2016 13:34:51 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29817-523-nyekXQnEDS@http.www.w3.org/Bugs/Public/>

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
The example is correct.

X?? does matches X occurring zero or one times, just as X? does. The difference
between the two, as explained in the text below the example, as that X? matches
the longest possible substring, while X?? matches the shortest possible.

For example, the result of

replace("AAA", "(A?)(A+)", "1=$1 2=$2")

is "1=A 2=AA"

while the result of 

replace("AAA", "(A??)(A+)", "1=$1 2=$2")

is "1= 2=AAA"

Michael Kay

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 12 September 2016 13:34:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:02 UTC