You could also use:

String.indexOf(String s)
or
String.startsWith(String s)
or

http://jakarta.apache.org/regexp/

for full blown pattern matching..

Regards,
Levi Cook

-----Original Message-----
From: Nik DAMPIER [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 10:44 AM
To: [EMAIL PROTECTED]
Subject: matching strings in java


Hi, Again
another quick question on string matching I know I can use
string1.equalsIgnoreCase(string2) and this is true if they match completly
but how I match just part of a string i.e,
a list with
blue;
black;
green;

and I wanted to match the string "bl" it would match blue and black and if I
wanted to match will "e" I would get blue and green

cheers Nik

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to