<div class="clearfix _42ef"><div class="_6a rfloat"><div class="_6a _6b" style="height:50px"></div><div class="_6a _6b"><span class="_52m- _3lt"><a class="hidden_elem uiButton" href="#" role="button" ajaxify="/ajax/follow/follow_profile.php?profile_id=100003717698520&amp;location=4" rel="async-post" id="u_0_2g"><i class="mrs img sp_at8kd9 sx_dedf3e"></i><span class="uiButtonText">关注</span></a><label class="profileFollowButton _52nf _3spg uiButton" id="u_0_2h" for="u_0_2j"><i class="mrs img sp_at8kd9 sx_d4ea38"></i><input value="&#x5173;&#x6ce8;" aria-haspopup="1" data-profileid="100003717698520" type="submit" id="u_0_2j" /></label></span></div></div><div class="uiProfileBlockContent"><div class="_6a"><div class="_6a _6b" style="height:50px"></div><div class="_6a _6b"><div><span class="fsl fwb fcb"><a href="https://www.facebook.com/karma.dawa.7?fref=st" data-hovercard="/ajax/hovercard/user.php?id=100003717698520">杜汶澤 <span class="alternate_name">(Karma Dawa)</span></a></span>&nbsp;<div class="inlineBlock"><span class="fsm fwn fcg">· 307,993 位关注者</span></div></div><ul class="uiList _4kg"><li><span class="_50hf fsm fwn">在 <a class="uiLinkSubtle" href="https://www.facebook.com/pages/EEG-%E8%8B%B1%E7%9A%87%E5%A8%9B%E6%A8%82/190788624279794">EEG (英皇娛樂)</a> 任 <a class="uiLinkSubtle" href="https://www.facebook.com/pages/ProducerArtist/143848955644597">Producer/Artist</a></span></li></ul></div></div></div></div></div></li><li class="followListItem fbProfileBrowserListItem"><div class="clearfix"><a class="_8o _8t lfloat" href="https://www.facebook.com/holaam?fref=pb" tabindex="-1" aria-hidden="true"><img class="_s0 _rw img" src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/623959_1231987616_2122202226_q.jpg" alt="" /></a><div class="clearfix _42ef"><div class="_6a rfloat"><div class="_6a _6b" style="height:50px"></div><div class="_6a _6b"><span class="_52m- _3lt"><a class="hidden_elem uiButton" href="#" role="button" ajaxify="/ajax/follow/follow_profile.php?profile_id=1231987616&amp;location=4" rel="async-post" id="u_0_2c"><i class="mrs img sp_at8kd9 sx_dedf3e"></i><span class="uiButtonText">关注</span></a><label class="profileFollowButton _52nf _3spg uiButton" id="u_0_2d" for="u_0_2f"><i class="mrs img sp_at8kd9 sx_d4ea38"></i><input value="&#x5173;&#x6ce8;" aria-haspopup="1" data-profileid="1231987616" type="submit" id="u_0_2f" /></label></span></div></div><div class="uiProfileBlockContent"><div class="_6a"><div class="_6a _6b" style="height:50px"></div><div class="_6a _6b"><div><span class="fsl fwb fcb"><a href="https://www.facebook.com/holaam?fref=st" data-hovercard="/ajax/hovercard/user.php?id=1231987616">Jackie Fung</a></span>&nbsp;<div class="inlineBlock"><span class="fsm fwn fcg"> · 朋友请求已送出</span><span class="fsm fwn fcg">· 33 位关注者</span></div></div><ul class="uiList _4kg"><li><span class="_50hf fsm fwn"><a class="uiLinkSubtle" href="https://www.facebook.com/pages/Hong-Kong/113317605345751">Hong Kong</a></span></li></ul></div></div></div></div></div></li><li class="followListItem fbProfileBrowserListItem"><div class="clearfix"><a class="_8o _8t lfloat" href="https://www.facebook.com/li.sally.96?fref=pb" tabindex="-1" aria-hidden="true"><img class="_s0 _rw img" src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/370802_100003238374636_486819783_q.jpg" alt="" /></a><div class="clearfix _42ef"><div class="_6a rfloat"><div class="_6a _6b" style="height:50px"></div><div class="_6a _6b"><span class="_52m- _3lt"><a class="hidden_elem uiButton" href="#" role="button" ajaxify="/ajax/follow/follow_profile.php?profile_id=100003238374636&amp;location=4" rel="async-post" id="u_0_28"><i class="mrs img sp_at8kd9 sx_dedf3e"></i><span class="uiButtonText">关注</span></a><label class="profileFollowButton _52nf _3spg uiButton" id="u_0_29" for="u_0_2b"><i class="mrs img sp_at8kd9 sx_d4ea38"></i><input value="&#x5173;&#x6ce8;" aria-haspopup="1" data-profileid="100003238374636" type="submit" id="u_0_2b" /></label></span></div></div><div class="uiProfileBlockContent"><div class="_6a"><div class="_6a _6b" style="height:50px"></div><div class="_6a _6b"><div><span class="fsl fwb fcb"><a href="https://www.facebook.com/li.sally.96?fref=st" data-hovercard="/ajax/hovercard/user.php?id=100003238374636">肖丽</a></span>&nbsp;<div class="inlineBlock"><span class="fsm fwn fcg"> · 朋友请求已送出</span><span class="fsm fwn fcg">· 33 位关注者</span></div>大家看我这一段HTML源码,我要从中筛选到所有模块id为100003717698520的值,求正则表达式怎么写呀?行业数据C#正则表达式

解决方案 »

  1.   

    你发了这么多正则表达式的数据筛选,为什么不正儿八经去学一个html解析库呢?
    http://htmlagilitypack.codeplex.com/
    http://zhoufoxcn.blog.51cto.com/792419/595344
      

  2.   

    (?i)(?<=<a.*?id=100003717698520">)(.*?)(?=<)
      

  3.   

    我不是只要这一个id值,下面的id=100003238374636">肖丽,id值也要阿
      

  4.   

    大家看我这一段HTML源码,我要从中筛选到所有模块id为100003717698520的值,求正则表达式怎么写呀?
      

  5.   

    (?i)(?<=<a.*?id=\d+">)(.*?)(?=<)
      

  6.   

    (?i)(?<=<a.*?id=\d+">)(.*?)(?=<)
    你少个引号
      

  7.   

    new Regex(@"(?i)(?<=<a.*?id=\d+"">)(.*?)(?=<)", RegexOptions.ExplicitCapture)
      

  8.   

    id=\d(?<id>.*?)">(?<name>.*?)<
      

  9.   

    錯了,改一下
    id=(?<id>\d*?)">(?<name>.*?)<