Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Regex substitution problemby mahira (Acolyte) |
on Feb 14, 2009 at 12:02 UTC ( [id://743807]=perlquestion: print w/replies, xml ) | Need Help?? |
mahira has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have a problem with a substition The text is; From: aaa@bb.netxxxMessage-Id: xxx<200902131530.n1DFUZ5l001303@aaa.bb.net>xxxTo: xxx@yyy.netxxxSubject: Size atanan xxx numarali ticket hakkindaxxxContent-Type: text/plain; charset=ISO-8859-9xxxContent-Transfer-Encoding: 7bit The substitution regex is; $to_email =~ s/.+To:\s(.*)xxx/\1/; The result is; xxx@yyy.netxxxSubject: Size atanan xxx numarali ticket hakkindaxxxContent-Type: text/plain; charset=ISO-8859-9xxxContent-Transfer-Encoding: 7bit The result must be; xxx@yyy.net Please help... Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|