FAQ
Hi Shawn (and all),
On Tuesday 24 May 2011 15:05:06 Shawn H Corey wrote:
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.
The identifier for the module is "Regexp::Common" (with the "p") - not
"Regex::Common" . Your URL should be mostly OK (though KMail broke it). Minor
nitpick.

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Parody of "The Fountainhead" - http://shlom.in/towtf

What is is. Perceive It. Integrate it. Act on it. Idealize it.
-- Leonard Peikoff

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
groupbeginners @
categoriesperl
postedMay 24, '11 at 4:10a
activeMay 25, '11 at 12:40p
posts4
users3
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase