k3170makan

duckduckgo link stripper in perl

Apr 10th, 2012
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.28 KB | None | 0 0
  1. #!/usr/bin/perl -w
  2. #author: k3170makan
  3. #Strips links from a duckduckgo.com page XD
  4. #two lines, no semi-colons doesn't work that well for google page :(
  5. foreach(<>){
  6.     print $+{URL},"\n" if m/(?<ANCHOR><a[\s].*?href=(?:[\"\w_\-\d]+).*?)/?m/(?<URL>http:\/\/(?:[\w_\-\d\.]+)*)/:0}
Advertisement
Add Comment
Please, Sign In to add comment