aspose file tools*
The moose likes Java in General and the fly likes It is about regex Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

It is about regex

Nakul P. Patel
Greenhorn

Joined: May 31, 2011
Posts: 25
I have String : "extend cup end table"

case 1:If i use patter "e.+d" it will find() match: extend cup end

case 2:If i use patter "e.+?d" it will find() match: extend end

Can someone please let me know what is difference between ".+" and ".+?"

I know that + is one or more and ? is one or zero. But i am not able to understand how does it work.

Thanks. Nakul
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Closing as a duplicate of this thread. Please read this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: It is about regex