From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Forrest Newsgroups: gmane.emacs.help Subject: Re: Regular expression - replace lower case to upper case Date: Thu, 31 Oct 2002 21:33:10 -0500 Organization: University of Virginia Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1036119417 4353 80.91.224.249 (1 Nov 2002 02:56:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 1 Nov 2002 02:56:57 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 187RzT-000183-00 for ; Fri, 01 Nov 2002 03:56:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 187Rzl-0006LQ-00; Thu, 31 Oct 2002 21:57:13 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!kant.larc.nasa.gov!hearst.acc.Virginia.EDU!murdoch.acc.Virginia.EDU!mug.sys.virginia.edu!drf5n Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: mug.sys.virginia.edu Original-X-Trace: murdoch.acc.Virginia.EDU 1036118190 17390 128.143.6.251 (1 Nov 2002 02:36:30 GMT) Original-X-Complaints-To: abuse@virginia.edu Original-NNTP-Posting-Date: 1 Nov 2002 02:36:30 GMT In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:106639 X-Originally-To: Rod Farmer Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3189 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3189 On Fri, 1 Nov 2002, Rod Farmer wrote: > Hi, > I've been looking through the manuals and can't seem to find how to > replace all occurences of HTML tags in lower case, ie with upper case > as seems to be the W3C standards for 4.01 > > I was going to use M-x % regexp RET string RET but what I really want is > something like the s/foo/bar/g where > bar can actually be a reference back to the string that has been > matched..... Well, you will probably need to write a function. regexps CAN refer back to parts of the matched string (using \(html|body\) in the search part, and \1 in the replace part), but they won't be able to uppercase it. Dave -- Dave Forrest (434)924-3954w(111B) (804)642-0662h (804)695-2026p drf5n@virginia.edu http://mug.sys.virginia.edu/~drf5n/