Java tutorial
//package com.java2s; public class Main { public static String rmKeyWords(String objectString, String firMatchString, String secMatchString, String thrMatchString) { if (objectString.contains(firMatchString) || objectString.contains(secMatchString) || objectString.contains(thrMatchString)) { objectString = objectString.replaceAll(firMatchString, ""); objectString = objectString.replaceAll(secMatchString, ""); objectString = objectString.replaceAll(thrMatchString, ""); } return objectString; } }