示例
1. http://ad.ly/123411/http://blabalba.com/adaf
2. http://ad.ly/142145/http://blabal.com/adf34
how to replace front String http://ad.ly/1246721/ use js regex
into http://blabalbal.com/adaf
最佳答案
所需的正则表达式为http:\/\/adf_.ly\/\d+\/(.+)
var str = 'http://adf_.ly/1246721/http://prefiles.com/files';
var re = /http:\/\/adf_.ly\/\d+\/(.+)/;
var newstr = re.exec(str)[1];
关于javascript - 正则表达式字符串 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20344451/