One liner perl extract content with regular expression


/ Published in: Perl
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. curl -s http://checkip.dyndns.org | perl -nle 'print "$1" if (/Current IP Address: ([\d.]*)/)'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.