unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Help with query-replace-regexp
@ 2005-01-30 11:47 Michael Preminger
  2005-01-30 12:16 ` martin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Preminger @ 2005-01-30 11:47 UTC (permalink / raw)


Id like to replace a nonspace followed by a space, with the same 
nonspace followed by a comma.


how do I express it in a query-replace-regexp command?

Thanks

Michael

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

* Re: Help with query-replace-regexp
  2005-01-30 11:47 Help with query-replace-regexp Michael Preminger
@ 2005-01-30 12:16 ` martin
  2005-01-30 15:00 ` August
  2005-02-01 17:36 ` Kevin Rodgers
  2 siblings, 0 replies; 4+ messages in thread
From: martin @ 2005-01-30 12:16 UTC (permalink / raw)



"MP" == Michael Preminger <michaelp@hio.no> writes:
 MP> Newsgroups: gnu.emacs.help
 MP> Date: Sun, 30 Jan 2005 12:47:26 +0100
 MP> Organization: UNINETT
 MP> 
 MP> Id like to replace a nonspace followed by a space, with the same
 MP> nonspace followed by a comma.
 MP> 
 MP> 
 MP> how do I express it in a query-replace-regexp command?

M-: (query-replace-regexp "\\([^ ]\\) " "\\1," nil nil nil) RET

 MP> 
 MP> Thanks
 MP> 
 MP> Michael
 MP> 
 MP> 
-- 
parozusa at web dot de

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

* Re: Help with query-replace-regexp
  2005-01-30 11:47 Help with query-replace-regexp Michael Preminger
  2005-01-30 12:16 ` martin
@ 2005-01-30 15:00 ` August
  2005-02-01 17:36 ` Kevin Rodgers
  2 siblings, 0 replies; 4+ messages in thread
From: August @ 2005-01-30 15:00 UTC (permalink / raw)


On sön, 2005-01-30 at 12:47 +0100, Michael Preminger wrote:
> Id like to replace a nonspace followed by a space, with the same 
> nonspace followed by a comma.
> 
> 
> how do I express it in a query-replace-regexp command?
> 
> Thanks
> 
> Michael
> 
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Interactively, enter `\([[:graph:]]\) ' as the regular expression to
search for and `\1,' as the replacement string (you should of course
omit the quotation marks).

-- 
August

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

* Re: Help with query-replace-regexp
  2005-01-30 11:47 Help with query-replace-regexp Michael Preminger
  2005-01-30 12:16 ` martin
  2005-01-30 15:00 ` August
@ 2005-02-01 17:36 ` Kevin Rodgers
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-02-01 17:36 UTC (permalink / raw)


Michael Preminger wrote:
 > Id like to replace a nonspace followed by a space, with the same
 > nonspace followed by a comma.
 >
 >
 > how do I express it in a query-replace-regexp command?

C-M-% \([^ C-q SPC ]\) C-q SPC RET \1, RET

-- 
Kevin Rodgers

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

end of thread, other threads:[~2005-02-01 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-30 11:47 Help with query-replace-regexp Michael Preminger
2005-01-30 12:16 ` martin
2005-01-30 15:00 ` August
2005-02-01 17:36 ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).