I saw one code example and didn't understand how this prints only Print statement. Appreciate your help on this.
String str = "<a href=/utility/ReportResult.jsp?reportId=5>Print</a>";
System.out.println(str.replaceAll("\\<.*?\\>", ""));
OutPut: Print
How to modify my regex expression to print Print<>Report instead of PrintReport. Below is my regex and statement. String str = "Print<>Report";
System.out.println(str.replaceAll("<.*?>", ""));