日期:2014-05-20  浏览次数:20675 次

怎么用正则表达式获取当的网址
有文本如下, 怎么用正则表达式获取当的网址

HTML code

??<br />
<br />
Gnomon Workshop: Production FX Workflows Dragon Age - Origins<br />
<br />
<br />
<br />
<img src="http://preview.filesonic.com/img/1396361.jpeg" border="0" alt="" /><br />
<br />
<br />
<b>Gnomon Workshop: Production FX Workflows Dragon Age - Origins</b><br />
<br />
English | VP6 1024x768 4:3 15 fps ~ 800kbps | MP3 22.05 kHz 1 ch 48 kbps | 2.42 GB<br />
<br />
<br />
<br />
Brandon Young presents his production FX workflow by reconstructing a shot from the Dragon Age: Origins cinematic created at Blur Studio. He goes over the shot breakdown, the goals of the shot and how to achieve them quickly. Brandon shows how to use Particle Flow, FumeFX and stock elements to make the effects shine. He then delves into rendering and compositing the effects elements into the actual production shot.<br />
<br />
Topics covered:<br />
<br />
Working Efficiently<br />
<br />
Breaking down the shot<br />
<br />
Blur Studio FX workflow<br />
<br />
Tools in 3dsmax<br />
<br />
Particle Flow<br />
<br />
FumeFX<br />
<br />
Fusion Compositing<br />
<br />
<br />
<br />
<b>Download:</b><br />
<br />

 
 
http://www.1ju.org/file/2027817/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part1.rar

http://www.1ju.org/file/2027863/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part2.rar

http://www.1ju.org/file/2027866/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part3.rar

http://www.1ju.org/file/2028052/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part4.rar

http://www.1ju.org/file/2028123/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part5.rar

http://www.1ju.org/file/2029052/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part6.rar

http://www.1ju.org/file/2028054/Gnomon_Production_FX_Workflows_Dragon_Age_Origins.part7.rar

  <br />



------解决方案--------------------
(http://)?www[!<>\s]++

------解决方案--------------------
(http[s]?://[\\w\\.\\-/]+)
------解决方案--------------------
Java code

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ExtractUrl {

    public static void main(String[] args) {
        String src = "......"; // 这里插入你要查询的文本
        String reg = "(http[s]?://[\\w\\.\\-/]+)";
        Pattern p = Pattern.compile(reg);
        Matcher m = p.matcher(src);
        while(m.find()) {
            System.out.println(m.group(1));
        }
    }

}

------解决方案--------------------
LZ你说清楚你的网址都是在那些地方会出现的?真不会叫我们写个随便丢个字符串就能获取网址的东西吧,那种全覆盖难度大,我不会,你说清楚会在什么地方出现,针对性的我还会写。
------解决方案--------------------
探讨

Java code

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ExtractUrl {

public static void main(String[] args) {
String src = "......"; // 这里插入你要查询的文本
……