How can we replace all the string of a sentence that start from <\ and end >
Is there any way available for this.
for now i am replacing each word manually.
example : -
test = test.replace("</tr>", "");
        test = test.replace("</html>", "");
How can we replace all the string of a sentence that start from <\ and end >
Is there any way available for this.
for now i am replacing each word manually.
example : -
test = test.replace("</tr>", "");
        test = test.replace("</html>", "");
You can use the .replaceAll method.
From the java docs:
Replaces each substring of this string that matches the given regular expression with the given replacement.
Java code should be:
test.replaceAll("<\\/\\w+>");