Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] findAll() behavior that I can't explain

Evgeny Goldin

2010-08-30

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi all,

http://groovyconsole.appspot.com/script/216001

I expected findAll() to return a list of two elements, as returned by
closure - there's only one match for the whole String.

Instead it returns a list, where my two-elements list (returned by closure)
is its first element, hence I had to add [0] to make it work in the second
example. Second element of the list returned is null.

I guess my understanding of findAll(Pattern pattern, Closure closure)
(http://goo.gl/m5rD) is wrong.
What is actually returned?

Thank you!


-----
Best regards,
Evgeny
http://evgeny-goldin.com/

--
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.