The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Greedy quantifiers(*) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Greedy quantifiers(*)" Watch "Greedy quantifiers(*)" New topic

Greedy quantifiers(*)

K Raj Kumar

Joined: Sep 16, 2008
Posts: 17
Hi Ranchers!

java Regex2 "\d*" ab34ef


I am unable to interpret the last part of the output esp at"456".
So,please help me in understanding it.

Source:SCJP 6 study java guide, Kathy sierra and Bert bates, Self Test,Page 515.

Thanks in advance!

With Regards,<br />K.Raj Kumar.
Punit Singh
Ranch Hand

Joined: Oct 16, 2008
Posts: 952

Run this and try to understand it is very simple.

Ankit Garg

Joined: Aug 03, 2008
Posts: 9463

This question is answered comprehensively in FAQ. The link is in my signature...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: Greedy quantifiers(*)
jQuery in Action, 3rd edition