Using regex to extract URLs from plain text with Perl

前端 未结 7 1959
梦如初夏
梦如初夏 2020-12-16 05:12

How can I use Perl regexps to extract all URLs of a specific domain (with possibly variable subdomains) with a specific extension from plain text? I have tried:



        
相关标签:
7条回答
  • 2020-12-16 06:05

    URLs aren't allowed to contain spaces, so instead of .*? you should use \S*?, for zero-or-more non-space characters.

    0 讨论(0)
提交回复
热议问题