help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regular expression - replace lower case to upper case


From: David Forrest
Subject: Re: Regular expression - replace lower case to upper case
Date: Thu, 31 Oct 2002 21:33:10 -0500

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 <body> with upper case
> <BODY> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]