> Steve Bertrand wrote:
> ...
>> while ($buf = ) {
>> # $buf now contains line of file, one per each loop of while
>> $buf =~ /(\w+)/;
>> $userName = $1;
>> ...do something with $userName
>> }
>
> This is a common error. You should not use $1 without making sure the
> regex
> did in
Steve Bertrand wrote:
...
> while ($buf = ) {
> # $buf now contains line of file, one per each loop of while
> $buf =~ /(\w+)/;
> $userName = $1;
> ...do something with $userName
> }
This is a common error. You should not use $1 without making sure the regex
did in fact match. Othe
alter [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 19, 2004 8:57 AM
> To: 'Khairul Azmi'; [EMAIL PROTECTED]
> Subject: RE: simple regular expression problem
>
> Khairul Azmi wrote:
>> Hi all,
>> I am a newbie. I just need to extract the string containing
'@', returning 'user' (w/o quotes).
Read:
perldoc perlop
perldoc perlretut
perldoc perlre
I HTH, and I surely hope that I've been reasonably accurate with my
assessment.
Steve
>
> Thanks
>
> AD
>
> -Original Message-----
> From: Bob Showalt
D]
Subject: RE: simple regular expression problem
Khairul Azmi wrote:
> Hi all,
> I am a newbie. I just need to extract the string containing the unix
> account from the following text
>
> <[EMAIL PROTECTED]> SIZE=1024.
I'm guessing you want to extract the string &q
Khairul Azmi wrote:
> Hi all,
> I am a newbie. I just need to extract the string containing the unix
> account from the following text
>
> <[EMAIL PROTECTED]> SIZE=1024.
I'm guessing you want to extract the string "user"? (But how do you know
that that corresponds to a Unix account?)
The followi
Khairul Azmi wrote:
I just need to extract the string containing the unix account from
the following text
<[EMAIL PROTECTED]> SIZE=1024.
Can anyone tell me how to do it in perl?
Try the docs.
perldoc perlrequick
perldoc perlretut
perldoc perlre
Thanks in advance.
You're welcome.
--
Gunn
Hi all,
I am a newbie. I just need to extract the string containing the unix
account from the following text
<[EMAIL PROTECTED]> SIZE=1024.
Can anyone tell me how to do it in perl? Thanks in advance.
Azmi
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROT