On Sun, Apr 10, 2011 at 12:27 AM, Brian F. Yulga
wrote:
> shawn wilson wrote:
>>
>> On Sat, Apr 9, 2011 at 3:29 PM, wrote:
>>
>>>
my $address_count = () = $str =~ /box|street|avenue|lane|apo/ig;
>>
>> what does print $var = () = $str =~ /regex/; do?
>> particularly the '= () ='?
>>
>
> Accor
As others have already pointed out - Padre is a very nice IDE. For quick work
(one not requiring an "IDE"), I like Vim (GVim), Notepad++, and gedit on
Windows. I must admit that gedit is a tad slow on the uptake, so really I
would recommend Notepad++ for a newer user and Vim for someone that h
On Thu, Apr 07, 2011 at 11:26:10AM -0700, Jim Gibson wrote:
> On 4/7/11 Thu Apr 7, 2011 10:48 AM, "Balaji krishnan"
> scribbled:
>
> > Hi folks
> >
> > I have been using shell script for my admin work and recently decided to use
> > perl fo all my automation. So proud I did that.
> >
> > Quic
On 2011-04-08 14:34, Shawn H Corey wrote:
my @words = split /\s+/, $string;
See perldoc -f split, about why you might want to write that as
my @words = split ' ', $string;
To get it to not capture any matches, use the non-capture parentheses:
@num = split /(?:(?:a|b)+)/, $x;
Does tha
Brian F. Yulga wrote:
my @mail_types = qw( avenue road box lane );
my @words = split /\s/, $fields;
my $count = grep {
my $found;
foreach my $street ( @mail_types ) {
if ( /\b$street\b/i ) {
$found++;
last;
}
}
$found;
} @words;
print qq(fo
shawn wilson wrote:
On Sat, Apr 9, 2011 at 3:29 PM, wrote:
my $address_count = () = $str =~ /box|street|avenue|lane|apo/ig;
what does print $var = () = $str =~ /regex/; do?
particularly the '= () ='?
According to "Effective Perl Programming (2nd Ed.)", Item 9 (Know the
dif
shawn wilson wrote:
On Sat, Apr 9, 2011 at 3:29 PM, wrote:
It is detecting but not testing if any particular 2 words are in a
text field and I think that's what you explained you were testing for.
Sorry if my first post was misleading. Those were just some examples.
I'm looking o
On Sat, Apr 9, 2011 at 3:29 PM, wrote:
> Hi Chris,
>
>> It is detecting but not testing if any particular 2 words are in a
>> text field and I think that's what you explained you were testing for.
>
> Sorry if my first post was misleading. Those were just some examples.
> I'm looking on
On 09/04/2011 21:30, Olof Johansson wrote:
On 2011-04-10 01:40 +0530, Sunita Rani Pradhan wrote:
You are right. Thanks for pointing out. Can you help me getting it
correct ?
Somebody already mentioned Regex::Common.
Use the same module for email addresses:
use Regexp::Common qw/ net Emai
Mariano Loza Coll wrote:
Hello everyone,
Hello,
Here's what I need to do: I need to take each of the words in one
List1, search for their presence (or not) in a second List2 and make a
new list with all the words in both. These are lists of gene names,
which can often include numbers and symb
On 2011-04-10 01:40 +0530, Sunita Rani Pradhan wrote:
> Hi Johan
s/Johan/Olof/, but who keeps score?
> You are right. Thanks for pointing out . Can you help me
> getting it correct ?
Somebody already mentioned Regex::Common.
--
- Olof Johansson
- www: http://www.stdlib.se/
-
Hello Mariano,
use List::MoreUtils qw( any each_array );
I was experimenting and forgot to take off `each_array` from the import
list. `each_array` is not used in the alternative solution and is hence
not required.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To uns
Hi Johan
You are right. Thanks for pointing out . Can you help me
getting it correct ?
Thanks
Sunita
-Original Message-
From: Olof Johansson [mailto:o...@ethup.se]
Sent: Sunday, April 10, 2011 12:13 AM
To: beginners@perl.org
Subject: Re: regular expression for email id and IP
Hello Mariano,
I realize that there may be a number of ways to do what I need to do
(most of them better, I bet), and I'd love to learn about them. But
now I'm mostly curious about why grep// cannot "see" words with
parentheses in either (or both lists). I suspect the trick may be
somehow escapi
Hi Chris,
> It is detecting but not testing if any particular 2 words are in a
> text field and I think that's what you explained you were testing for.
Sorry if my first post was misleading. Those were just some examples.
I'm looking only for an occurrence of _any_ two words in that li
Hello everyone,
Here's what I need to do: I need to take each of the words in one
List1, search for their presence (or not) in a second List2 and make a
new list with all the words in both. These are lists of gene names,
which can often include numbers and symbols in addition to letters.
The very
On 2011-04-09 23:53 +0530, Sunita Rani Pradhan wrote:
> Yes it is matching 167.249.0.0 .
But it's also matching things like "42". Feature?
Read about quantifiers, and also about the precedence of |.
--
- Olof Johansson
- www: http://www.stdlib.se/
- {mail,xmpp}: o...@ethup.se
- ir
use Regexp::Common qw/ net /;
$ip =~ /$RE{net}{IPv4}/;
Yes it is matching 167.249.0.0 .
-Sunita
-Original Message-
From: Jim Gibson [mailto:jimsgib...@gmail.com]
Sent: Saturday, April 09, 2011 11:50 PM
To: Perl Beginners
Subject: Re: regular expression for email id and IP address
At 11:42 PM +0530 4/9/11, Sunita Rani Pradhan wrote:
>Hi All
>
At 11:42 PM +0530 4/9/11, Sunita Rani Pradhan wrote:
Hi All
1. Can anybody guide me to write a regular expression to
verify correct Email address ?
peldoc -q valid "How do I check a valid mail address?"
2. I have written a regular expression to verify correct
Hi All
1. Can anybody guide me to write a regular expression to
verify correct Email address ?
2. I have written a regular expression to verify correct IP address :
print $ipadd if ($ipadd =~
/^([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|([1-2
21 matches
Mail list logo