Parse HTML Page For Links With Regex Using Perl

> **Possible Duplicate:** > [How can I remove external links from HTML using Perl?](https://stackoverflow.com/questions/1598053/how-can-i-remove-external-links-from-html-using-perl) Alright, i'm working on a job for a client right now who just switched up his language choice to Perl. I'm not the best in Perl, but i've done stuff like this before with it albeit a while ago. There are lots of links like this: Death Becomes Her (1992) I want to match the path "/en/subtitles/3586224/death-becomes-her-en" and put those into an array or list (not sure which ones better in Perl). I've been searching the perl docs, as well as looking at regex tutorials, and most if not all seemed geared towards using ~= to match stuff rather than capture matches. Thanks, Cody
Your question is confusing: 1. There is a distinction between lists and arrays in Perl, but it's not the sort of distinction you seem to have in mind. 2. To capture matches, you use =~. Here's another distinction that doesn't exist in Perl.

以上就是Parse HTML Page For Links With Regex Using Perl的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏