cs-au-dk/dk.brics.automaton

got a diff result from the java Pattern and Automaton

adiaixin opened this issue · 1 comments

String str = "num1=123&num2=456";
String regex = "num1=.&num2=.";
p = Pattern.compile(regex);
System.out.println(p.matcher(str).matches());
Automaton automaton = new RegExp(regex).toAutomaton();
System.out.println(automaton.run(str));
//result : true , false

if I add '\\' before '&' the result is "true, true"

is '&' a special char?

found '#' have the same problem

it also return empty when do intersection between two same regex contain the special char.

is it have other special char ?