From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tim Visher" Newsgroups: gmane.emacs.help Subject: Utilizing Regexp (or something else) to replace an arbitrary string length of the same character with the same string length of another character. Date: Wed, 26 Nov 2008 09:41:08 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227715598 11984 80.91.229.12 (26 Nov 2008 16:06:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2008 16:06:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 26 17:07:40 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L5MvS-0004LX-BB for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Nov 2008 17:07:38 +0100 Original-Received: from localhost ([127.0.0.1]:44762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L5MuI-0004tf-FT for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Nov 2008 11:06:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L5M6N-0007mm-FP for help-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:14:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L5M6L-0007iy-UY for help-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:14:51 -0500 Original-Received: from [199.232.76.173] (port=44469 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L5M6L-0007ip-Pw for help-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:14:49 -0500 Original-Received: from rn-out-0910.google.com ([64.233.170.191]:36349) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L5LZm-0001Ca-Dc for help-gnu-emacs@gnu.org; Wed, 26 Nov 2008 09:41:10 -0500 Original-Received: by rn-out-0910.google.com with SMTP id k32so496837rnd.7 for ; Wed, 26 Nov 2008 06:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=7261V+QrxlSQDi4aMDDCrtDkMbQ00DBIV521zVhlMIw=; b=OZ7P+8aWaKmDFZDx78xqBKEZrpTHWyXBPjYb47aRPqqZEVp7nYV6nKYgPKF8XrRWZb rBT0OQDGLIuGT7GsBrSHumH3blrWL9/V3ky6LawMx4zsXrfNZ8kw2TLqjibwr4yKCeh6 xdPO6v5ENQFJrU8CJdd2+hxxjIeBMvR7lqgUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=RYI3ISsYxHUg2DJ3FCNyE01YrgFJKzkBcTbZOHSD5240bNqJITfASZbgRrHr9XCgk2 2UIcVIKrlNWX2A8Y4I+fXi9kZDHbTqoxLOgMJBoNPye3wjChuFEwViGtHMfaM8CdB5H1 M0VeGTFOK0+EsMZU4UHeWrsEm97qjUXDbWMTU= Original-Received: by 10.100.164.20 with SMTP id m20mr3075505ane.97.1227710468083; Wed, 26 Nov 2008 06:41:08 -0800 (PST) Original-Received: by 10.100.232.8 with HTTP; Wed, 26 Nov 2008 06:41:08 -0800 (PST) Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Wed, 26 Nov 2008 11:05:44 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60135 Archived-At: Hello Everyone, I have a bunch of arbitrarily long strings of '=' characters and I would like to replace them one for one with '-' characters. I know I could do this with a simple find and replace using isearch, but that would require me going through them one at a time. I'm wondering if there's a way to do this with a regex such as: r/(=+)/-{length of n} Obviously that's a major bastardization of syntax and doesn't really exist in any language, but I figure this should be able to be done in Emacs somehow. Thanks in advance! -- In Christ, Timmy V. http://burningones.com/ http://five.sentenc.es/ - Spend less time on e-mail