日期:2014-05-17  浏览次数:20893 次

求助使用正则表达式提取网页中的文字
我现在要从网页的源码中提取出我需要的文字内容,但是对正则表达式不熟,所以请教高手帮我看看应该怎么弄,谢谢!

我需要的内容:
1、Dear My friends, 2011已经过去了,烦恼也统统过去了,寒冷也悄悄走了,疲惫也渐渐消失了,让我们梳理下心情,携着幸福,带上快乐一起狂奔,2012我们来了!
2、Hi ,辛苦一年不容易,大家都很努力,工作有了新成绩,欢喜我们都如意,11总结走过去,12重新再崛起,把激情留下,把斗志守住,把目标牢记,把奋斗拼起,愿你12再创辉煌,成就奇迹。

网页源码内容如下:
------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<head>
<meta forua="true" http-equiv="Cache-Control" content="no-cache" />
<meta forua="true" http-equiv="Cache-Control" content="max-age=0" />
<meta forua="true" http-equiv="Cache-Control" content="must-revalidate" />
</head>

<card id="start" title="消息盒子">
<p>

会话2|<a href="/im/box/unDealSystemList.action">待处理</a>|<a href="/im/box/notNeedDealSystemList.action">通知</a>


<br/>========<br/>
<img alt="." src="/im/images/userstatus/closed.gif"/><a href="/im/chat/toinputMsg.action?touserid=901049322&amp;box=true&amp;t=65221772848667869">民</a>:Dear My friends, 2011已经过去了,烦恼也统统过去了,寒冷也悄悄走了,疲惫也渐渐消失了,让我们梳理下心情,携着幸福,带上快乐一起狂奔,2012我们来了!(使用电脑登录飞信,更多功能更精彩) 09:12<br/>

<anchor>回复<go method="post" href="/im/chat/toinputMsg.action"><postfield name="touserid" value="901049322"/><postfield name="backUrl" value="alllist"/></go></anchor>|<anchor>对话<go method="post" href="/im/chat/toinputMsg.action"><postfield name="touserid" value="901049322"/></go></anchor>|<anchor>转发<go method="post" href="/im/sayHello/sayHelloChooseFriendsByAll.action"><postfield name="type" value="all"/><postfield name="selectType" value="all"/><postfield name="fromSelect" value="fromSelectAll"/><postfield name="sayHelloText" value="Dear My friends, 2011已经过去了,烦恼也统统过去了,寒冷也悄悄走了,疲惫也渐渐消失了,让我们梳理下心情,携着幸福,带上快乐一起狂奔,2012我们来了!
(使用电脑登录飞信,更多功能更精彩)"/></go></anchor>|<anchor>删除<go method="post" href="/im/box/deleteMessages.action"><postfield name="fromIdUser" value="901049322"/></go></anchor><br/>--------<br/>
<img alt="." src="/im/images/userstatus/VIPsms.gif"/><a href="/im/chat/toinputMsg.action?touserid=421794820&amp;box=true&amp;t=65221772848816869">英</a>:Hi ,辛苦一年不容易,大家都很努力,工作有了新成绩,欢喜我们都如意,11总结走过去,12重新再崛起,把激情留下,把斗志守住,把目标牢记,把奋斗拼起,愿你12再创辉煌,成就奇迹。(使用电脑登录飞信,更多功能更精彩) 09:13<br/>

<anchor>回复<go method="post" href="/im/chat/toinputMsg.action"><postfield name="touserid" value="421794820"/><postfield name="backUrl" value="alllist"/></go></anchor>|<anchor>对话<go method="post" href="/im/chat/toinputMsg.action"><postfield name="touserid" value="421794820"/></go></anchor>|<anchor>转发<go method="post" href="/im/sayHello/sayHelloChooseFriendsByAll.action"><postfield name="type" value="all"/><postfield name="selectType" value="all"/><postfield name="fromSelect" value="fromSelectAll"/><postfield name="sayHelloText" value="