Hi want to extract String between HTML Tags from a source code but I am getting an error by using the code given below. Could someone help me with the reason for error?
Pattern pattern = Pattern.compile("/\<body[^>]*\>([^]*)\<\/body/");
Matcher matcher = pattern.matcher(s1);
while (matcher.find()) {
System.out.println( "Found value: " + matcher.group(1).trim() );
}
The error I am getting is: "Invalid escape sequence"
Thanks