emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HowTo: directory-files and friends and case-insensitive match


From: John Wiegley
Subject: Re: HowTo: directory-files and friends and case-insensitive match
Date: Sun, 07 Feb 2016 12:46:37 -0500
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin)

>>>>> raman  <address@hidden> writes:

> I'm specifically trying to match file extensions in a case insensitive
> manner in this instance, so yes a somewhat more confined problem. Given the
> complexity I'll just go ahead and construct the regexp to match lower and
> upper case.

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.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]