String someFunction="init";
Pattern regex = Pattern.compile(
"function\\s*?"+someFunction+"\\(.*?\\)\\s*?\\{[^{}]*?(\\{.*?\\})*[^{}]*?\\}"
, Pattern.DOTALL | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.MULTILINE);
时间: 2024-10-05 13:06:44