RFR: 8164781: Pattern.asPredicate specification is incomplete
martinrb at google.com
Mon Apr 2 18:05:53 UTC 2018
On Sun, Apr 1, 2018 at 3:56 AM, Uwe Schindler <uschindler at apache.org> wrote:
> In general, I'd prefer to have a predicate that uses matches() instead of
> find(). In my code I have never used find() because in most cases you want
> to match the whole string anyways. Of course you can use ^ and $ but I
> don't like that leniency. If I write code, I prefer to be explicit in the
> code what should done.
I have the opposite experience. find()'s behavior is the default with grep
and perl regexes, so the behavior of matches() is the one I trip over.
More information about the core-libs-dev