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

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

Re: replacing whitespace (regexp question)


From: Kai Großjohann
Subject: Re: replacing whitespace (regexp question)
Date: Mon, 17 Feb 2003 20:49:34 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50

q8e192@yahoo.com (Henry Chan) writes:

> How do I replace the whitespace at the beginning of a line with nothing
> i.e.
> I want to perform something like:
> $str =~ s#^\s+##;

First of all, you can replace the regexp ^\s-+ with nothing, using
query-replace-regexp.

Secondly, C-x h C-u - 999 C-x C-i might be useful, as well.  (If you
have lines starting with more than 999 spaces, it won't work.  But
I'm sure you can guess what to do in that case.)
-- 
A turnip curses Elvis


reply via email to

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