Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Greedy quantifiers(*)

 
K Raj Kumar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers!


java Regex2 "\d*" ab34ef

Output:01234456

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!
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Run this and try to understand it is very simple.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is answered comprehensively in FAQ. The link is in my signature...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic