JDK-4757029 : Add API to limit searches within a Matcher's character sequence
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.regex
  • Affected Version: 1.4.0,1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-10-02
  • Updated: 2017-05-16
  • Resolved: 2003-06-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Description

Name: rmT116609			Date: 10/02/2002


DESCRIPTION OF THE PROBLEM :
A method in java.util.regexp.Matcher should be added :
Matcher.find(int startAt,int endAt). This method actually
exists but it's private.It could be handful to have this
method if we want to restrict the range of the query.

(Review ID: 158408) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b10
14-06-2004

WORK AROUND Get a subsequence and search on that. The drawbacks of this workaround is that you might have to copy the data to make the subsequence, and then the indexes have to be shifted back to the original sequence indexes. So this workaround could potentially be inconvenient, error-prone, and hurt performance. Another alternative is to do the search and reject a match if it occurs beyond the index you want. The drawback of this workaround is performance related; the search may go a long ways beyond where you want and it might take a long time doing it in a large sequence. In certain rare cases the regex may even need more resources than are available if it is allowed to search through the whole sequence when it might complete on a smaller one.
11-06-2004

EVALUATION A possibility for Tiger. ###@###.### 2002-10-02 The regions API has been approved and added in Tiger. ###@###.### 2003-06-05
02-10-2002