Hi Gurus,
I am new to perl and need some help to learn regex in perl. From the
below line i need to extract following:

Part I
1) $ENVFROM = [email protected]
2) $ENVTO1 = [email protected]
3) $ENVTO2 = [email protected]
4) $ENVTO3 = [email protected]


line=EnvFrom: [email protected], HdrTo: <[email protected]>,
EnvTo: [email protected], [email protected], [email protected], Subject:
TEST for perl

Part II
We have a huge log files with thousands of entries like above so might
need to be done in either while  /for loop in the final phase. Also,
the EnvTo: can be from one email address to multiple. In the above
example there are 3 EnvTo but it can be more than 3 or can be one only
but the regex should be able to determine and put each in a scalar
variable.

I do need the regex specific to Part I (This will help me learn the
regex better)  and also separate regex for Part II if possible.

I am newbie to Perl and in the learning phase so please be descriptive
if possible in the answer. I greatly appreciate your help.


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to