We're updating the issue view to help you get more done. 

Regexp, Allow Quantifiers on zero-length tests?

Description

Allow quantifiers on zero-length tests?

This is a Java compatibility question.
Java allows things like "`^`" or "\b" to appear in patterns.
It doesn't make any sense to repeat a test for being on a boundary position; any appearances of these constructs in patterns probably are an error or a misunderstanding by the author of the pattern.

ICU started to match Java, with quantifiers allowed on '`^`' and '$'. But there are many more, including look-ahead and look-behind.

ICU should be consistent with itself, and either allow these everywhere, or disallow them everywhere. Disallow seems best -

  • They don't do anything useful, and are likely user errors.

  • Allowing would require care, to avoid any possibility of sending the match engine
    into a loop on the zero length (no progress) match.

Historically, ICU dis-allowed these.

Environment

Status

Assignee

Andy Heninger

Reporter

Andy Heninger

Time Needed

Days

tracCreated

Dec 10, 2007, 7:01 PM

tracOwner

andy

tracProject

ICU4C

tracReporter

andy

tracStatus

accepted

tracWeeks

0.5

Components

Priority

minor