日期:2014-05-17 浏览次数:21050 次
public static void main(String[] args) {
String html = "http://NDIvMS8xNi9sZXR2LXV0cy84NzAzMjgzLWF2Yy0yNTQyMzctYWFjLTMxNTg2LTI3MDQyNDAtMTAwODM1ODY2LTQyYmNiZjhhMjY2OTAzMGNjNjAwNDJkODE3YjRlY2ZmLTEzODUzOTM0NTE0MzMuZmx2?b=http://NDIvMS8xNi9sZXR2LXV0cy84NzAzMjkwLWF2Yy0xNjExMzU4LWFhYy0xMjQzNjktMjcwNDI0MC02MDM1NzQ0NzgtNGNjNmQ5NzQ0NzY4Y2EyOWM5ZmVjN2YzYWY2Yjc4MDEtMTM4NTM5OTQzNjM2My5mbHY=?b=http://NDIvMS8xNi9sZXR2LXV0cy84NzAzMjg4LWF2Yy05MzczNTUtYWFjLTEyNDM2OS0yNzA0MjQwLTM3MDI3NjYwNS1mMGY0NWVlMDZhMGE1MjliNGJjMzM2ZTkzNTBjNWQwYS0xMzg1Mzk4OTcwMjk2LmZsdg==?b=";
final Pattern PATTERN_JSON_OF_RAND = Pattern
.compile("http://([0-9a-zA-Z]+?)\\?b=");
Matcher m = PATTERN_JSON_OF_RAND.matcher(html);
while (m.find()) {
System.out.println(m.group());
}
}
public class Test {
public static void main(String[] args) {
//base64: a-z A-Z 0-9 / + =
String http =
"http://jZmLTEzODUzOTM0NTE0MzMuZmx+2?b="+
"http://NmQ5NzQ0NzY4Y2EyOWM5ZmVjN2/Y=?b="+
"http://NDM2OS0yNzA0MjQwLTM3MDI3N/+jY==?b=";
String reg = "http://([A-Za-z0-9\\+/=]+)\\?b=";
java.util.regex.Pattern p = Pattern.compile(reg