cunzhen
V2EX  ›  PHP

新手 PHP 正则表达式的小疑问,求指教

  •  
  •   cunzhen · Nov 7, 2018 · 2462 views
    This topic created in 2831 days ago, the information mentioned may be changed or developed.
    PHP 新手,最近在练习正则表达式,但是感觉好难懂,虽然规则和语法都会。。。

    想获取 myip.ipip.net 网页的内容,把 IP,国家,省会,城市,运营商分别获取并分别存储,但是除了 IP 的正则表达式写对了(\d+\.\d+\.\d+\.\d+),其他的都不会弄了,有没有前辈写出详细代码并注释一下?
    cunzhen
        1
    cunzhen  
    OP
       Nov 7, 2018
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2954 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 17ms · UTC 08:33 · PVG 16:33 · LAX 01:33 · JFK 04:33
    ♥ Do have faith in what you're doing.