|
-
August 11th, 1999, 08:02 AM
#1
Pattern Matcher
Hi,
I am just trying to find a pattern matching api . Can u tell me which
one can I use.
I have a
String str = "Good";
String test = "G*";
I want to know whether 'str' is of the pattern 'test' (in this case true).
Thanx in advance.
If a reply could also be copied to [email protected] , I'd really
appreciate it.
With Regards,
Lachu
[email protected]
-
August 11th, 1999, 09:47 AM
#2
Re: Pattern Matcher
hai,
As far as i know, there is no pattern matching api as such. Instead of opting for a readymade api, u could make the best use of methods in String/StringBuffer classes.
Methods that would be very important to achieve your goal would be startsWith(), endsWith(), regionMatches() etc. Java's string handling capabilities are so good that U could accomplish your objective with very few lines of code. U could refer to documentation of Sun for the exact signatures of these methods.
thanx,
devi prasad
[email protected]
-
August 11th, 1999, 03:25 PM
#3
Re: Pattern Matcher
There are several free regular expressions packages in Java that will do what you require - for example
http://www.oroinc.com/
Raj
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|