<span style="font-size:18px;">
</span>
Java处理文章内容无效的img标签,使用正则表达式匹配img以及src<span style="font-size:14px;"> String FyqXwContent = fqyPublicOpinion.getFyqXwContent().replace("\'", "\"");
Pattern pImg = Pattern.compile("(<img.*?>)",Pattern.CASE_INSENSITIVE);
Matcher mImg = pImg.matcher(FyqXwContent);
yuQingInfo.setFyqXwContent(FyqXwContent);
while(mImg.find()) {
String result = mImg.group();
Pattern p = Pattern.compile("src=\"([^\"]+)\"");
Matcher m = p.matcher(result);
while(m.find()){
if(m.group().contains("http") == false){
String Lastresult = yuQingInfo.getFyqXwContent().replace(result, "