结合java脚本,使用正则表达式来匹配文本
例子:
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class QuoteExtractor {
public static void main(String[] args) {
String input = "[\"技术部\"]";
String regex = "\"([^\"]*)\"";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(input);
while (matcher.find()) {
System.out.println(matcher.group(1));
}
}
}