• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regex

 
Ankur kothari
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are there any gud articles on regex and greedy quantifiers?
 
Henry Wong
author
Marshal
Pie
Posts: 21446
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
 
little baby
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Spam remvoved.]
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"little baby" please check your private messages for some administrative matter...
 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • 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 Java Spring
  • Mark post as helpful
  • send pies
  • 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!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic