I have project to detect if editor have write html entities, but when it containt \n it doesnt work? why?
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexTest {
public static void main(String[] args) {
String text = "asdasdas <h1>Test</h1></div>";
String regex = ".*<[^<]+>.*";
Pattern pattern = Pattern.compile(regex);
Matcher m = pattern.matcher(text);
System.out.println(m.matches());
}
}