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

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

Re: Operate on region string


From: Tassilo Horn
Subject: Re: Operate on region string
Date: Mon, 18 Sep 2006 14:55:57 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Hadron Quark <hadronquark@gmail.com> writes:

Hi Hadron,

> I want something like this to work on a buffer region
>
> (defun remove-vowels-region(te)
>   "Remove the vowels"
>   (interactive "sTe:")
>   (replace-regexp-in-string "[aeiouAEIOU]" "" te)
> )

Try that:

(defun remove-vowels-region (start end)
  (interactive "r")
  (replace-regexp "[aeiouAEIOU]" "" nil start end))

Bye,
Tassilo
-- 
[Emacs] is written in Lisp, which is the only computer language that is
beautiful.  -- Neal Stephenson, _In the Beginning was the Command Line_


reply via email to

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