Re: Lambda-fied pattern matching

2014-12-19 Thread Dan Smith
> On Nov 19, 2014, at 4:10 PM, Remi Forax wrote: > > and yes, please log a RFE. RFE is here: https://bugs.openjdk.java.net/browse/JDK-8067973

Re: Lambda-fied pattern matching

2014-12-04 Thread Paul Sandoz
Hi, Catching up on this. This seems useful: Stream Pattern.matchAsStream(...) MatchResult stream elements need to be cloned via Matcher.toMatchResult. The following is perhaps less useful though might be handy for some matcher updates before handing off to a stream: Stream Pattern.matc

Re: Lambda-fied pattern matching

2014-11-19 Thread Remi Forax
On 11/19/2014 10:54 PM, Dan Smith wrote: Working with the pattern matching API, I noticed that it could be made a lot less clumsy with some lambdafication. Here's the status quo: Pattern p = Pattern.compile("(\w)*, (\d)*, (\w)*"); for (String s : lines) { Matcher m = p.matcher(str);

Lambda-fied pattern matching

2014-11-19 Thread Dan Smith
Working with the pattern matching API, I noticed that it could be made a lot less clumsy with some lambdafication. Here's the status quo: Pattern p = Pattern.compile("(\w)*, (\d)*, (\w)*"); for (String s : lines) { Matcher m = p.matcher(str); if (m.match(s)) { System.out.println(