File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pattern class

 
aakash bhatt
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to ckeck many String values does exist in a variable String.
eg.
ASF ASD ASH ASJ ASL ASM ASK ASU ASY any of these values exist in my String Check
I had heard of Pattern class but not sure how to use it and what is the advantage.
Can i know about Pattern class
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class is java.util.regex.Pattern, Java's implementation of the powerful regular expression pattern-matching mechanism. Regex patterns can be fairly complicated, so read the details of building a regular expression in the above document closely.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a couple of introductory articles on Regular Expressions in Java 1.4 that you might find useful.
Take a look at An Introduction java.util.regex Part I and Part II.
Good luck.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic