all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* what means "\\s-" used as a regexp?
@ 2006-08-05 11:38 stefano.sabatini-lala
  2006-08-05 11:57 ` Ralf Angeli
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: stefano.sabatini-lala @ 2006-08-05 11:38 UTC (permalink / raw)


Hello everybody.

I recently found in some code the use of "\\s-". Documentation
appearantly said nothing on it.

(string-match "\\s-" "hello world")
==>5

(string-match "\\s-" "hello\\tworld")
==>nil

(string-match "\\s-" "hello\\nworld")
==>nil

So it seems "\\s-" match only the space.
But I still doesn't understand the  meaning of the hypen at the end of
the
regexp "\\s-".

(string-match "\\s" "hello world")
returns the error: (invalid-regexp "Premature end of regular
expression")

Thank you. 
--stefano

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

end of thread, other threads:[~2006-08-05 13:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-05 11:38 what means "\\s-" used as a regexp? stefano.sabatini-lala
2006-08-05 11:57 ` Ralf Angeli
2006-08-05 11:59 ` Michaël Cadilhac
2006-08-05 12:19 ` Eli Zaretskii
     [not found] ` <mailman.4894.1154780361.9609.help-gnu-emacs@gnu.org>
2006-08-05 13:33   ` stefano.sabatini-lala

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.