The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes group method function in Regex Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "group method function in Regex" Watch "group method function in Regex" New topic

group method function in Regex

Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72

The output is coming 01234456
I think answer should be 0123445, i dont know where i am confusing, Can somebody please let me know where i am miising the concept of group();
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804

After last letter can occur empty string.
Have a look, please:

BLOG: http://leakfromjavaheap.blogspot.com
Henry Wong

Joined: Sep 28, 2004
Posts: 18509


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72
Thanks to all...I got it
I agree. Here's the link: http://aspose.com/file-tools
subject: group method function in Regex
Similar Threads
group by
Regex - Matcher class
If condition
Parsing a String
using <html:iterate> to display an array in the array