aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Regex Expression Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Regex Expression" Watch "Regex Expression" New topic
Author

Regex Expression

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 202
Q1)Please correct me if i am wrong in understanding these quantifiers.

?(Zero or one)
\d?
This quantifier will search each digit seperately.For every digit it will give its index.If it does'nt find the digit ie(if there is character) it will give the corresponding index but it will report as empty.


*(Zero or More)
\d*
This quantifier will search for continous digits until it does'nt find character or spaces in between.It will represent the starting index of digits and entire digits as a one group.

Q2)Please let what you mean by greedy quatifier?
Amit Vinod Dali
Ranch Hand

Joined: Apr 14, 2010
Posts: 42
http://java.sun.com/docs/books/tutorial/essential/regex/quant.html

------------------------------------

http://java.sun.com/docs/books/tutorial/essential/regex/index.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regex Expression
 
Similar Threads
Question about regular expressions
Doubt in Regular Expression
Matcher.find() -> looks one past end of String?
Difference Among Greedy, Reluctant, and Possessive Quantifiers
Question about String.split() and zero-length results