This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

It is about regex

 
Nakul P. Patel
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing as a duplicate of this thread. Please read this.
 
    Bookmark Topic Watch Topic
  • New Topic