My java regex is
Pattern compile = Pattern.compile("^((?:[^\\n]+\\n?)+)\\n*");
String a = "# clj-markdown\n\nA Clojure library designed to ... well, that part is up to you.\n\n## Usage\nFIX==ME==\n\n## License\n\nCopyright © 2015 FIXME\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n";
System.out.print(compile.matcher(a));
System.out.print(compile.matcher(a).matches());
this output false,but I test in javascript can pass.
/^((?:[^\n]+\n?)+)\n*/.text(b)
how to resolve this problem?
may be this is java regex difference of javascript regex.
Pattern.DOTALL-- not sure if that will work.