From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Regexp matching (was: HowTo: directory-files and friends and case-insensitive match) Date: Mon, 08 Feb 2016 09:06:49 -0500 Message-ID: References: <83h9hmtg82.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454940457 12610 80.91.229.3 (8 Feb 2016 14:07:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Feb 2016 14:07:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 08 15:07:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aSmTP-0007bu-Uc for ged-emacs-devel@m.gmane.org; Mon, 08 Feb 2016 15:07:28 +0100 Original-Received: from localhost ([::1]:45061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSmTO-0002iE-Ml for ged-emacs-devel@m.gmane.org; Mon, 08 Feb 2016 09:07:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSmT2-0002fo-Ac for emacs-devel@gnu.org; Mon, 08 Feb 2016 09:07:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSmSx-0002KC-6Z for emacs-devel@gnu.org; Mon, 08 Feb 2016 09:07:04 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSmSw-0002Ji-Uc for emacs-devel@gnu.org; Mon, 08 Feb 2016 09:06:59 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aSmSv-000789-DF for emacs-devel@gnu.org; Mon, 08 Feb 2016 15:06:57 +0100 Original-Received: from 69-165-151-222.dsl.teksavvy.com ([69.165.151.222]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Feb 2016 15:06:57 +0100 Original-Received: from monnier by 69-165-151-222.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Feb 2016 15:06:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-165-151-222.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:oSX50/s3LTb+FoSI7axl0nMFSPc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199512 Archived-At: > To make any variation on .jpeg: > (directory-files DIR t "\\.[Jj][Pp][Ee]?[Gg]\\'") > You could write a helper function to "case insensitize" regexps, if one > doesn't already exist somewhere. FWIW: - We need to update/replace/rewrite our C-level regexp matching code. - Most likely, along the way we may be able to add "compiled-regexp" objects. Currently the regexp-compilation is done transparently, with a cache to avoid obvious performance issues; this works well in most cases, but offering access to compiled-regexps could open up a few more options. - I'd love it if the new code could provide something like `make-regexp-case-insensitive'; either applied to the string-regexp or to the compiled-regexp, or maybe as an option to `regexp-compile'. Stefan