• Post Reply 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

regex

 
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are there any gud articles on regex and greedy quantifiers?
 
author
Posts: 23931
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ankur kothari wrote:are there any [good] articles on regex and greedy quantifiers?



The sun tutorial is a good place to start...

http://java.sun.com/docs/books/tutorial/essential/regex/

Personally, I learn regex from Perl, and found their tutorial to be more complete -- although not related to Java...

http://perldoc.perl.org/perlretut.html

And of course, there is a website devoted to all things regex...

http://www.regular-expressions.info/tutorial.html

Henry
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Spam remvoved.]
 
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"little baby" please check your private messages for some administrative matter...
 
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


out put
Pattern is: \d\w
4 56
7 7a

anyone can explain the output please?
I read the above expression as "match any digit followed by 1 white space".
 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Minhaj kaimkhani wrote:

out put
Pattern is: \d\w
4 56
7 7a

anyone can explain the output please?
I read the above expression as "match any digit followed by 1 white space".



AH I got the answer \w = any character not white space!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic