From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael.cadilhac@lrde.org (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.help Subject: Re: what means "\\s-" used as a regexp? Date: Sat, 05 Aug 2006 13:59:48 +0200 Organization: Epita/LRDE Message-ID: <87u04rbdfv.fsf@lrde.org> References: <1154777931.859949.46540@m79g2000cwm.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0545542935==" X-Trace: sea.gmane.org 1154847944 28160 80.91.229.2 (6 Aug 2006 07:05:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Aug 2006 07:05:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 06 09:05:41 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G9chg-0000O9-PI for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Aug 2006 09:05:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G9chg-0004gB-5L for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Aug 2006 03:05:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G9Kp8-0004BA-CQ for help-gnu-emacs@gnu.org; Sat, 05 Aug 2006 08:00:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G9Kp1-00044L-IH for help-gnu-emacs@gnu.org; Sat, 05 Aug 2006 08:00:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G9Kp1-000448-3Y for help-gnu-emacs@gnu.org; Sat, 05 Aug 2006 08:00:03 -0400 Original-Received: from [62.39.139.2] (helo=kualalumpur.lrde.epita.fr) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G9Ksm-0002eq-Mq for help-gnu-emacs@gnu.org; Sat, 05 Aug 2006 08:03:56 -0400 Original-Received: from mahaena.lrde.epita.fr ([192.168.101.66] helo=mahaena.lrde) by kualalumpur.lrde.epita.fr with esmtp (Exim 4.50) id 1G9Kor-0001xd-1E; Sat, 05 Aug 2006 13:59:53 +0200 Original-To: stefano.sabatini-lala@poste.it Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVWPh+Tai+5r5YKBAEU CQQzGAtiq7gjAAACR0lEQVQ4jW2UzW7lIAyFzVW8BzTZX5DmCZLuU2H2pMXv/ypzbK7aSh2kRCRf /HNsE0q7Sg+RQ7JFKaqtrRNAl5AIIKe6D5DBqgbmUAe5hBI1wIRFAHjeM0RKtZi7XVVEpb0BSNfA IddChChT5DildSLWOWhY5IEItMnncZgFcUAc/5jjwCMsDosRNdfKPDTFEdVBW8C+RebDb4N5Orio RhM1+11IJyx0ng2+LryFHBMPDQDYHrY6IfGuU3ouiXTQNE8LIJDKOWpNxERTFrggQwRPd7USUsTW fJ0XbR3bdj5KgBYy4SACpxDeUYEUAzLmtJ1iIrD2gczPq8Qomjhsh/RjGIgKIO8p7NITjwlx7WID nsnQe5NeuTvoBpi8LX6vLLOh5icjOHqBypgnuSp7M+RE1agbQKHQr5E2z1WObhYW4gMqeGQL7joM jCf2DxSk5ApADSYHfFF4igNfJZL1z0GKP0FN02s4XiDXr7V5P94W6I9v8MfBOQDmfwAaVYt+x8Da v4DJvX8BAdin3Knm5yMZYAO4ABDkDniZLLfi4P40gP1F0TPGZOu0CGwA1lcowxwlGy6A9705mD0V jHCxwVZT/hYdRJVUGZNlx6l7ScQBTluof6Wj6bsPYlvpwoTvXFD9gHPn2TZPF3ntI2ecxVrW5MrV XiCie5EeNa7BlWu/HNSkprDUva163PHxAv5jyGV7gVzyAghSKOTnat85UIYFICXbD2NV9rRiv0BS tKQsg6OHH4A15F1WW+UHKHHa32h6aPnAm3/pUcWp+WYnTQAAAABJRU5ErkJggg== In-Reply-To: <1154777931.859949.46540@m79g2000cwm.googlegroups.com> (stefano sabatini-lala's message of "5 Aug 2006 04:38:51 -0700") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) X-Mailman-Approved-At: Sun, 06 Aug 2006 03:05:25 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36530 Archived-At: --===============0545542935== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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") > =3D=3D>5 > > (string-match "\\s-" "hello\\tworld") > =3D=3D>nil > > (string-match "\\s-" "hello\\nworld") > =3D=3D>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. `---- =2D-=20 | Micha=EBl `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 --' - -= -' --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFE1Ig4ZYNf4qobZ7kRAqCrAKCubPxJvaENXVinCU0XxLcuwKVkgQCfUI7P AbwnX/8Bue9ELtL5CXantCc= =pyAZ -----END PGP SIGNATURE----- --=-=-=-- --===============0545542935== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0545542935==--