icon Top 9 categories map      RocketAware > man pages >

fnmatch(3)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Solaris Others

[IEEE Std1003.2-1992 (``POSIX.2'').]

FNMATCH(3)                OpenBSD Programmer's Manual               FNMATCH(3)

NAME
     fnmatch - match filename or pathname using shell globbing rules



SYNOPSIS
     #include <fnmatch.h>

     int
     fnmatch(const char *pattern, const char *string, int flags);

DESCRIPTION
     The fnmatch() function matches patterns according to the globbing rules
     used by the shell.  It checks the string specified by the string argument
     to see if it matches the pattern specified by the pattern argument.

     The flags argument modifies the interpretation of pattern and string. The
     value of flags is the bitwise inclusive OR of any of the following con-
     stants, which are defined in the include file <fnmatch.h>.

     FNM_NOESCAPE  Normally, every occurrence of a backslash (`\') followed by
                   a character in pattern is replaced by that character.  This
                   is done to negate any special meaning for the character.
                   If the FNM_NOESCAPE flag is set, a backslash character is
                   treated as an ordinary character.

     FNM_PATHNAME  Slash characters in string must be explicitly matched by
                   slashes in pattern. If this flag is not set, then slashes
                   are treated as regular characters.

     FNM_PERIOD    Leading periods in string must be explicitly matched by pe-
                   riods in pattern. If this flag is not set, then leading pe-
                   riods are treated as regular characters.  The definition of
                   ``leading'' is related to the specification of
                   FNM_PATHNAME. A period is always leading if it is the first
                   character in string. Additionally, if FNM_PATHNAME is set,
                   a period is leading if it immediately follows a slash.

     FNM_LEADING_DIR
                   Ignore /* rest after successful pattern matching.

     FNM_CASEFOLD  Ignore case distinctions in both the pattern and the
                   string.

RETURN VALUES
     The fnmatch() function returns zero if string matches the pattern speci-
     fied by pattern, otherwise, it returns the value FNM_NOMATCH.

SEE ALSO
     sh(1),  glob(3),  regex(3)

STANDARDS
     The fnmatch() function conforms to IEEE Std1003.2-1992 (``POSIX.2'').

HISTORY
     The fnmatch() function first appeared in 4.4BSD.

BUGS
     The pattern `*' matches the empty string, even if FNM_PATHNAME is speci-
     fied.

OpenBSD 2.6                     April 28, 1995                               1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for fnmatch(3) functions
OpenBSD sources for fnmatch(3)


[Overview Topics]

Up to: File Path Name Strings - Operations on hierarchical names (paths, files, identifiers)


RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Solaris Others

[IEEE Std1003.2-1992 (``POSIX.2'').]




Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > fnmatch.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments