This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Pattern class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Pattern class" Watch "Pattern class" New topic
Author

Pattern class

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
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

Joined: Aug 20, 2001
Posts: 1815
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.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Pattern class
 
Similar Threads
Again in Problem with equals()
Set value of char and String ?
Java regex?
Loading classes from a jar which are not in ClassPath
File.exists() Problem