From: "Sayed, Irfan (Irfan)" <[EMAIL PROTECTED]>
> Can somebody please help me on following doubt.
Question. You may doubt our ability to help you with your questions,
but still what you have is a question, not a doubt. Please
distinguish the two.
> But still my doubt exist. How Perl knows
patmarbidon schreef:
> Can you try
> if ( $projet =~ /^([EMAIL PROTECTED])@/ ) {
>$provb = $1
> }
>
> You will collect all characters from the beginnning to the first '@'.
> If The first character is a '@' you will obtain an empty string.
> If the first character is a '@' and you want to exclu
Can you try
if ( $projet =~ /^([EMAIL PROTECTED])@/ ) {
$provb = $1
}
You will collect all characters from the beginnning to the first '@'.
If The first character is a '@' you will obtain an empty string.
If the first character is a '@' and you want to exclude this case use
'^([EMAIL PROTECTED
Can somebody please help me on following doubt.
--Irfan.
-Original Message-
From: Sayed, Irfan (Irfan)
Sent: Friday, October 19, 2007 4:49 PM
To: 'Siva Prasad'
Subject: RE: Regular expression
But still my doubt exist. How Perl knows that it has to stop at the @
character
As
Thanks for writing. I get no warnings when I use (ActiveState Perl on
Windows):
use Strict;
use Warnings;
$test = "Yea 123xrandomYea 456xdumdumNay 789xpop";
while ($test =~ /Yea (.*?)x.*?(Nay (.*?)x)?/g)
{
print "$1\n";
print "$2\n";
}
What I am looking for are pairs: $1