<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >System.Path.WildMatch</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_System-Path-WildMatch.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >MissingH-1.1.0.3: Large utility library</TD ><TD CLASS="topbut" ><A HREF="src/System-Path-WildMatch.html" >Source code</A ></TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >System.Path.WildMatch</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Portability</TD ><TD CLASS="infoval" >portable</TD ></TR ><TR ><TD CLASS="infohead" >Stability</TD ><TD CLASS="infoval" >provisional</TD ></TR ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" >John Goerzen <jgoerzen@complete.org></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" ><B >Contents</B ></TD ></TR ><TR ><TD ><DL ><DT ><A HREF="#1" >Wildcard matching </A ></DT ></DL ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" ><P >Matching filenames with wildcards. See also <A HREF="System-Path-Glob.html" >System.Path.Glob</A > for support for generating lists of files based on wildcards. </P ><P >Inspired by fnmatch.py, part of the Python standard library. </P ><P >Written by John Goerzen, jgoerzen@complete.org </P ><P >The input wildcard for functions in this module is expected to be in the standard style of Posix shells. </P ><P >That is: </P ><PRE >? matches exactly one character \* matches zero or more characters [list] matches any character in list [!list] matches any character not in the list </PRE ><P >The returned regular expression will always end in $ but never begins with ^, making it suitable for appending to the end of paths. If you want to match a given filename directly, you should prepend the ^ character to the returned value from this function. </P ><P >Please note: </P ><UL ><LI > Neither the path separator (the slash or backslash) nor the period carry any special meaning for the functions in this module. That is, <TT >*</TT > will match <TT >/</TT > in a filename. If this is not the behavior you want, you probably want <A HREF="System-Path-Glob.html" >System.Path.Glob</A > instead of this module. </LI ><LI > Unlike the Unix shell, filenames that begin with a period are not ignored by this module. That is, <TT >*.txt</TT > will match <TT >.test.txt</TT >. </LI ><LI > This module does not current permit escaping of special characters. </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AwildCheckCase" >wildCheckCase</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AwildToRegex" >wildToRegex</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="1" ><A NAME="1" >Wildcard matching </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:wildCheckCase" ><A NAME="v%3AwildCheckCase" ></A ></A ><B >wildCheckCase</B ></TD ><TD CLASS="declbut" ><A HREF="src/System-Path-WildMatch.html#wildCheckCase" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="arg" >:: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A ></TD ><TD CLASS="rdoc" >The wildcard pattern to use as the base </TD ></TR ><TR ><TD CLASS="arg" >-> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A ></TD ><TD CLASS="rdoc" >The filename to check against it </TD ></TR ><TR ><TD CLASS="arg" >-> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool" >Bool</A ></TD ><TD CLASS="rdoc" >Result </TD ></TR ><TR ><TD CLASS="ndoc" COLSPAN="2" ><P >Check the given name against the given pattern, being case-sensitive. </P ><P >The given pattern is forced to match the given name starting at the beginning. </P ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:wildToRegex" ><A NAME="v%3AwildToRegex" ></A ></A ><B >wildToRegex</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A ></TD ><TD CLASS="declbut" ><A HREF="src/System-Path-WildMatch.html#wildToRegex" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Convert a wildcard to an (uncompiled) regular expression. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.1</TD ></TR ></TABLE ></BODY ></HTML >