To match multiple A-label joins and name regular expression solutions

Source: Internet
Author: User
To match multiple A-label joins and name regular expressions
such as the source code

HTML Code
  
   Knowledge Whipple News China Journal Network Dragon Source Journal Network Postal News Subscription Network magazine shop MBA think-tank Encyclopedia star Astronomy Network an exhortation net
Pastoral Astronomy Forum Patent Home Global Science Science Squirrel will UFO exploration network shell NET I study net NetEase open Class
Wikipedia I want to self-study network China Study Network to know the NetEase College search and ask beginners to learn the Internet National Nuclear Safety Bureau


Alas, I'm embarrassed

I asked this question recently, but there was a lot of good-hearted people who helped me out when there was only one a tag. Http://topic.csdn.net/u/20111216/16/934599d3-8e99-4b94-8dae-28e5b9c455c4.html
But now that it's multiple a-tag, I'm going to make a mistake.
Also please expert guidance. How should I get it?



------Solution--------------------
PHP Code
Preg_match_all ('/(. *)$HREF) {$arr [$matches [2][$k]] = $href;} Var_export ($arr);/** output: Array (' whipple info ' = ' http://www.cqvip.com/', ' Chinese journal net ' = ' http://www.chinaqking.com/', ' Dragon Source Journal Network ' = ' http://www.qikan.com.cn/', ' postal subscription network ' = ' http://bk.183.com.cn/index.do ', ' Magazine Shop ' www.zazhipu.com/', ' MBA think-tank encyclopedia ' = ' http://wiki.mbalib.com/', ' star astronomy network ' = ' http://www.cosmoscape.com/', ' an exhortation net ' = ' http://www.quanxue.cn/', ' pastoral Astronomy forum ' = ' http://www.astronomy.com.cn/bbs/', ' patent house ' = ' http://www.patent-cn.com/' , ' global science ' = ' http://www.sciam.com.cn/', ' science squirrel will ' = ' http://songshuhui.net/', ' UFO discovery net ' = ' http://www.ufo-1.cn/' ', ' shell net ' = ' http://www.guokr.com/', ' I learn the net ' and ' http://www.5xue.com/', ' NetEase Open class ' and ' http://v.163.com/open/', ' Wikipedia ' = ' http://zh.wikipedia.org/', ' I want to self-study net ' = ' http://www.51zxw.net/', ' China study net ' = ' http://www.cscse.edu.cn/' ', ' know ' = ' http://www.zhihu.com/', ' NetEase Academy ', ' http://tech.163.com/school/video/', ' Search and ask ' wenwen.soso.com/', ' beginners learn to surf the internet ' = ' http://xue.baidu.com/', ' National nuclear Safety Agency ' = ' http://nnsa.mep.gov.cn/', ' Word league ' ' http://www.wordlm.com/', ' love to ask Knowledge ' =& Gt ' http://iask.sina.com.cn/', ' Chinese Civilization network ' and ' http://www.wenming.cn/', '//ps: Once achieved, there seems to be no way. */
------Solution--------------------
PHP Code
  
     Knowledge Whipple News China Journal Network Dragon Source Journal Network Postal News Subscription Network magazine shop MBA think-tank Encyclopedia star Astronomy Network an exhortation net
Pastoral Astronomy Forum Patent Home Global Science Science Squirrel will UFO exploration network shell NET I study net NetEase open Class
Wikipedia I want to self-study network China Study Network to know the NetEase College search and ask beginners to learn the Internet National Nuclear Safety Bureau
Word Alliance love to ask Knowledge people Chinese civilization network '; $patten = '/(. *) <\/a>/iu ';p reg_match_all ($patten, $str, $match); $result = Array (); for ($i = 0;$ I
   ";p Rint_r ($result);? >
   
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.