stefano.sabatini-lala@poste.it writes: > 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") ,----[ (info "(Elisp)Regexp Backslash") ] | `\sCODE' | matches any character whose syntax is CODE. Here CODE is a | character that represents a syntax code: thus, `w' for word | constituent, `-' for whitespace, `(' for open parenthesis, etc. | To represent whitespace syntax, use either `-' or a space | character. *Note Syntax Class Table::, for a list of syntax codes | and the characters that stand for them. `---- -- | Michaël `Micha' Cadilhac | Would someone please DTRT with this, | | Epita/LRDE Promo 2007 | then ACK? | | http://www.lrde.org/~cadilh_m | -- Richard Stallman | `-- - JID: micha@amessage.be --' - --'