fiz a ER e em qualquer outra ferramenta ela roda, no java não está rodando, fiz um código c# para verificar e não deu problema.
da erro no compile
Código C#
string erSrc = "((?<html>(href|src)\\s*=\\s*\")|(?<css>url\\())(?<url>.*js?)(?(html)\"|\\))";
Regex regCss = new Regex(erCss, RegexOptions.Compiled);
StringBuilder strBuilderSrc = new StringBuilder();
for (Match m = regCss.Match(head); m.Success; m = m.NextMatch())
{
strBuilderSrc.Append(regQuoted.Match(m1.Value));
strBuilderSrc.AppendLine();
strBuilderSrc.AppendLine();
}
Código JAVA
private final String ER_CSS_KEY = "((?<html>(href|src)\\s*=\\s*\")|(?<css>url\\())(?<url>.*css?)(?(html)\"|\\))";
Pattern pattern = Pattern.compile(ER_CSS_KEY);
Matcher matcher = pattern.matcher(head);
Set<String> lstCss = new HashSet<String>(matcher.groupCount());
while (matcher.find()) {
lstCss.add(matcher.group());
}
Erro
java.util.regex.PatternSyntaxException: Unknown look-behind group near index 26
((?(href|src)\s*=\s*")|(?url())(?.*css?)(?(html)"|))