W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2006

[Bug 4106] [F+O] regex syntax: position of backreference

From: <bugzilla@wiggum.w3.org>
Date: Fri, 22 Dec 2006 10:59:20 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1Gxi7U-0000KJ-S5@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106





------- Comment #2 from abel.online@xs4all.nl  2006-12-22 10:59 -------
Considering the construct 

(low)[\1]

and taken the current specs, one might be tempted to treat it as matching the
string "low" followed by any of the characters in the that string: [low]
(expanded backreference). Taken the string:

helloworld

then the regular expression would:
not match: "hel"
match:     "lowo"
not match: "rld"

This could be a potentially very powerful construct, but I for one have not
encountered it in any regular expression flavor (yet). For regular expression
engines, it may involve a lot of re-engineering to allow for expandable
character classes.

A better approach would be, I believe, to disallow the construct in its
entirety.
Received on Friday, 22 December 2006 10:59:43 UTC

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