skaterdav85 Posted January 9, 2010 Share Posted January 9, 2010 How do I make functionalArea case insensitive, so that the following code will replace any variation of the world "java" whether its "JAVA, java, Java, jAva" etc? Or do I need a completely different approach? String functionalArea = "Java";String skillset = "This is some really long string that will contain the word Java in it. Or it could be java.";String foundSkill = "<span style='color:red;'>"+functionalArea+"</span>";skillset = skillset.replace(functionalArea, foundSkill); Any help would be appreciated. I'm a Java newb. =) Link to comment Share on other sites More sharing options...
trinistorm Posted January 10, 2010 Share Posted January 10, 2010 Not to familiar with jsp but if you want to do that you may have to use a combination of regular expressions with conditional statements.This is a 1000 times easier with php as there are built in functions for this. I think the String API may have some methods to help you:String Api Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.