all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* regular expression for special character
@ 2008-12-07 13:18 tomer
  2008-12-07 14:57 ` Kevin Rodgers
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: tomer @ 2008-12-07 13:18 UTC (permalink / raw)
  To: help-gnu-emacs

i want  filter/delete  lines which only the ascii code 0xa with emas
interactive commnd.
Is it possible ?
thanks
Tomer


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: regular expression for special character
  2008-12-07 13:18 regular expression for special character tomer
@ 2008-12-07 14:57 ` Kevin Rodgers
  2008-12-07 14:57 ` Kevin Rodgers
       [not found] ` <mailman.2141.1228662014.26697.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2008-12-07 14:57 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: help-gnu-emacs

tomer wrote:
> i want  filter/delete  lines which only the ascii code 0xa with emas
> interactive commnd.
> Is it possible ?

M-x delete-matching-lines RET ^$ RET

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: regular expression for special character
  2008-12-07 13:18 regular expression for special character tomer
  2008-12-07 14:57 ` Kevin Rodgers
@ 2008-12-07 14:57 ` Kevin Rodgers
       [not found] ` <mailman.2141.1228662014.26697.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2008-12-07 14:57 UTC (permalink / raw)
  To: help-gnu-emacs

tomer wrote:
> i want  filter/delete  lines which only the ascii code 0xa with emas
> interactive commnd.
> Is it possible ?

M-x delete-matching-lines RET ^$ RET

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: regular expression for special character
       [not found] ` <mailman.2141.1228662014.26697.help-gnu-emacs@gnu.org>
@ 2008-12-07 17:53   ` tomer
  2008-12-07 21:35     ` Peter Dyballa
  2008-12-09 14:28     ` Kevin Rodgers
  0 siblings, 2 replies; 6+ messages in thread
From: tomer @ 2008-12-07 17:53 UTC (permalink / raw)
  To: help-gnu-emacs

On Dec 7, 4:57 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> tomer wrote:
> > i want  filter/delete  lines which only the ascii code 0xa with emas
> > interactive commnd.
> > Is it possible ?
>
> M-x delete-matching-lines RET ^$ RET
>
> --
> Kevin Rodgers
> Denver, Colorado, USA

Thaks very much , it works.
I last question about it ( i hope i am rude)
i need to filter (blank lines space,tabs,empy line mix of them)
Is it possible with single command
I tried delete-blank line and it didnt help ?
Thanks
Tomer


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: regular expression for special character
  2008-12-07 17:53   ` tomer
@ 2008-12-07 21:35     ` Peter Dyballa
  2008-12-09 14:28     ` Kevin Rodgers
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2008-12-07 21:35 UTC (permalink / raw)
  To: tomer; +Cc: help-gnu-emacs


Am 07.12.2008 um 18:53 schrieb tomer:

> i need to filter (blank lines space,tabs,empy line mix of them)

	(replace-regexp "^\([ 	]+\|\)
" "")

IOW (in other words): replace all occurrences of strings that consist  
of a series of one or more SPC or of one or more TAB or a mixture  
them or of nothing with nothing.

You can test such regular expressions with isearch-forward-regexp or  
isearch-backward-regexp.

BTW, the linefeed you see in my regexp *is* a linefeed.

--
Greetings

   Pete

It's not the valleys in life I dread so much as the dips.
				– Garfield







^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: regular expression for special character
  2008-12-07 17:53   ` tomer
  2008-12-07 21:35     ` Peter Dyballa
@ 2008-12-09 14:28     ` Kevin Rodgers
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2008-12-09 14:28 UTC (permalink / raw)
  To: help-gnu-emacs

tomer wrote:
> On Dec 7, 4:57 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
>> tomer wrote:
>>> i want  filter/delete  lines which only the ascii code 0xa with emas
>>> interactive commnd.
>>> Is it possible ?
>> M-x delete-matching-lines RET ^$ RET
> 
> Thaks very much , it works.
> I last question about it ( i hope i am rude)
> i need to filter (blank lines space,tabs,empy line mix of them)
> Is it possible with single command
> I tried delete-blank line and it didnt help ?

M-x delete-matching-lines RET ^ [ SPC TAB ] * $ RET

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-09 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-07 13:18 regular expression for special character tomer
2008-12-07 14:57 ` Kevin Rodgers
2008-12-07 14:57 ` Kevin Rodgers
     [not found] ` <mailman.2141.1228662014.26697.help-gnu-emacs@gnu.org>
2008-12-07 17:53   ` tomer
2008-12-07 21:35     ` Peter Dyballa
2008-12-09 14:28     ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.