Closed
Description
RegExp re = ...
I want to say something like
Match m = re.matchAt(str, pos);
or
String s = re.matchStringAt(str, pos);
The match should be tethered to the given position, i.e. succeed only if str[pos ... end) matches the re.
Currently all the RegExp methods do a search and none do a simple match. It is inconvenient to have to specify regexps with a leading ^ and there is no convenient way to convert a RegExp without a leading ^ into one with.
None of search methods allow a search in a substring. This would be OK if string.substring was guaranteed constant time + space, but the documentation on String.substring makes no claims.