[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
what means "\\s-" used as a regexp?
From: |
stefano . sabatini-lala |
Subject: |
what means "\\s-" used as a regexp? |
Date: |
5 Aug 2006 04:38:51 -0700 |
User-agent: |
G2/0.2 |
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