Posted By

0xced on 12/04/07


Tagged

regular perl Expression extract oneliner


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

darkphotn
icecreamboyy


One liner perl extract content with regular expression


 / Published in: Perl
 

Don't use the -l switch if you don't want a new line.

  1. curl -s http://checkip.dyndns.org | perl -nle 'print "$1" if (/Current IP Address: ([\d.]*)/)'

Report this snippet  

You need to login to post a comment.