From owner-freebsd-questions@FreeBSD.ORG Sat Nov 22 05:00:23 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9918216A4CE for ; Sat, 22 Nov 2003 05:00:23 -0800 (PST) Received: from hotmail.com (law11-oe18.law11.hotmail.com [64.4.16.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC9B243FCB for ; Sat, 22 Nov 2003 05:00:22 -0800 (PST) (envelope-from weiwuzhang@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 22 Nov 2003 05:00:11 -0800 Received: from 218.193.5.120 by law11-oe18.law11.hotmail.com with DAV; Sat, 22 Nov 2003 13:00:11 +0000 X-Originating-IP: [218.193.5.120] X-Originating-Email: [weiwuzhang@hotmail.com] Message-ID: <3FBF5DEA.2030405@hotmail.com> Date: Sat, 22 Nov 2003 21:00:26 +0800 From: Zhang Weiwu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4.1) Gecko/20031105 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Nov 2003 13:00:11.0426 (UTC) FILETIME=[9034C020:01C3B0F8] Subject: newbie: use in RE? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2003 13:00:23 -0000 Hello. Just want to know how to use special character in Regular Expression. I wish to remove all the carrier returns from a text file, I can use: tr -d "\r" < text_file > modified_text_file But if I do: sed -i s/\r//g text_file it actually removes all the character "r" from the file. This is also a problem in vi(1). Besides I wish to manipulate tabstops and line-feeds with RE too.