On 11-05-24 12:10 AM, vishesh kumar wrote:
Hi Members,

   I am a linux system admin. I want to use perl as a command line like sed
and awk.
For example suppose , i need to extract IP Addr from a string or file using
regrex
i mean
   str="hello ip is 192.168.2.1 and data is xxx"
And i want ip addr only using Regex
  echo $str | perl -pe  ??????

Please guide me,


Download the module Regex::Common from CPAN: http://search.cpan.org/~abigail/Regexp-Common-2011041701/lib/Regexp/Common.pm

The pattern Regex::Common::net matches IPv4 addresses.


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to