import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegularTest {
public static void main(String[] arg){
String text=”(content:\”rcpt to root\”;pcre:\”word\”;)”;
String rule1=”content:\”.+\””; //贪婪模式
String rule2=”content:\”.+?\””; //非贪婪模式
System.out.println(“文本:”+text);
System.out.println(“贪婪模式:”+rule1);
Pattern p1 =Pattern.compile(rule1);
Matcher m1 = p1.matcher(text);
while(m1.find()){
System.out.println(“匹配结果:”+m1.group(0));
}
System.out.println(“非贪婪模式:”+rule2);
Pattern p2 =Pattern.compile(rule2);
Matcher m2 = p2.matcher(text);
while(m2.find()){
System.out.println(“匹配结果:”+m2.group(0));
}
}
}
#######three_up_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201901/26/bd423696da5a8027fbc9016cf23003f4_13448900.apk#######
#######three_down_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201902/13/089694fffba25e1e867e436731360b68_65837400.apk#######
#######four_up_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201901/26/86629923dce54093a2848c68a025919d_59918900.apk#######
#######four_down_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201902/13/554c4300904af32f3661652cd2b1caa4_78642200.apk#######
#######five_up_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201901/26/9610fd06bbd6a50d7e74fd53a08c7f5e_74584300.apk#######
#######five_down_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201902/21/445cc24b9d7495f801700ea2feb99f56_27488800.apk#######
#######six_up_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201901/26/60ad2c866dd391441dcf4c943147d044_61232500.apk#######
#######six_down_icon_100.png###http://wap.apk.anzhi.com/data5/apk/201902/13/bbe524fac9abfdc86cd9e92776c9f930_02908500.apk#######
#######xxks_icon_100.png###http://shouji.360tpcdn.com/190213/115ad2b82839436a10b19ccf6e00265f/com.shandong.ks.ks_8.apk#######
#######zxs_icon_100.png###http://appdl.hicloud.com/dl/appdl/application/apk/b6/b69f42bd2a5445619c20c59bb1189159/com.shandong.zibo.zhuxinsuan.1902251708.apk?sign=portal@portal1551518166308&source=portalsite&uid=null#######
今天的文章ctstt_CT和MSCT区别分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/69569.html