Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

It is about regex

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 80636
471
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Closing as a duplicate of this thread. Please read this.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic