|
Posted by szr on June 20, 2008, 4:59 pm
Please log in for more thread options
Martijn Lievaart wrote:
> On Fri, 20 Jun 2008 11:32:27 +0200, Dr.Ruud wrote:
>
>> Martijn Lievaart schreef:
>>> On Thu, 19 Jun 2008 08:38:40 +0200, Martijn Lievaart wrote:
>>
>>>> perl -nie 'if (/\@hotmail.com@$/) { s/"//g; print; }' text_file
>>>
>>> Or even:
>>>
>>> perl -nie 's/"//g; print if /\@hotmail.com@$/' text_file
>>
>> Don't you mean this?
>>
>> perl -ne 's/"//g; print if /\@hotmail\./' text_file
>
> I think I ment this:
>
> perl -ni -e 's/"//g; print if /\@hotmail.com@$/' text_file
>
> (-i makes a backup, -ie probably takes the 'e' as the backup suffix.)
Maybe I'm missing something, but I don't understand why you have an @
near the end of your regex just before the $ ? I can't find any mention
of it in perldoc or my Perl Pocket Refererence, but it's possible I'm
missing something.
Thanks.
--
szr
|