Skip to content

Instantly share code, notes, and snippets.

String s = "encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp0wHYbg/NOPO3nzMD3dndwS0MccuMeXCHgVlGOoYyFwLdS24Im2e7YyhB0wrUsyYf0/nhzCzBK8ZC9eCWqd0aHbdgOQT6CuFQBMjbyGYvlVYU2ZP7kG9Ft6YV6oc9ambuO7nPZh+bvXH0zDKfi02prknrScAKC0XhadTHT3Al0QIDAQAB');\n\nheaders: {"
+"\n'VerificationToken': 'T1g_69b6CqBB1C0kO7XBYp_H_eVCUjnCU6GB7o3lx7VHCpSgKncivkOQuKPAxR2czgCxBb1ctnA2uK-GsIYijNH_F5Y1:Xn2ZkeeD-Ythul_Y6GxHrOcuW7bLwrUQxwf23E9hNVDPVQupoTzIdyvSch-z2-f3Ay1m8yRiISslUetKVMi3ExT1t3k1'"
+"\n},";
Matcher m = Pattern.compile("encrypt\\.setPublicKey\\('([^']+)'.*.*VerificationToken':'([^']+)'").matcher(s.replaceAll("\\s+", ""));
if (m.find()){
String publicKey = m.group(1);
String VerificationToken = m.group(2);
System.out.println(publicKey);
System.out.println(VerificationToken);
}
@funsunz
funsunz / no_ad_baidu.css
Last active June 12, 2016 13:56
去推广广告,多列卡片显示的百度搜索stylish样式
body {
overflow-x: hidden;
min-width: 600px;
/*background-color: rgb(248,248,248);*/
}
#container {
width: 100%
}
#content_right {
display: none