From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Converting a string to valid XHTML id? Date: Mon, 29 Nov 2010 19:08:14 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291054127 24055 80.91.229.12 (29 Nov 2010 18:08:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Nov 2010 18:08:47 +0000 (UTC) Cc: Emacs-Devel devel To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 29 19:08:43 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PN89L-0002rw-Ow for ged-emacs-devel@m.gmane.org; Mon, 29 Nov 2010 19:08:42 +0100 Original-Received: from localhost ([127.0.0.1]:51103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PN89L-0002z9-58 for ged-emacs-devel@m.gmane.org; Mon, 29 Nov 2010 13:08:27 -0500 Original-Received: from [140.186.70.92] (port=39912 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PN89D-0002yG-A9 for emacs-devel@gnu.org; Mon, 29 Nov 2010 13:08:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PN89B-0006B4-ST for emacs-devel@gnu.org; Mon, 29 Nov 2010 13:08:19 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.9]:49246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PN89B-0006AG-NR for emacs-devel@gnu.org; Mon, 29 Nov 2010 13:08:17 -0500 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 9E7F71C08C5D; Mon, 29 Nov 2010 19:08:14 +0100 (CET) Original-Received: from igel.home (ppp-93-104-132-195.dynamic.mnet-online.de [93.104.132.195]) by mail.mnet-online.de (Postfix) with ESMTP id 948691C00118; Mon, 29 Nov 2010 19:08:14 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 501) id 62A3ACA2A0; Mon, 29 Nov 2010 19:08:14 +0100 (CET) X-Yow: I feel like I'm in a Toilet Bowl with a thumbtack in my forehead!! In-Reply-To: (Lennart Borgman's message of "Mon, 29 Nov 2010 02:43:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133234 Archived-At: Lennart Borgman writes: > Do we have a function somewhere for converting a string to a valid XHTML id: (replace-regexp-in-string "\\`[^A-Za-z]" "X" (replace-regexp-in-string "[^A-Za-z0-9_:.-]" "_" string)) Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."