Skip to content

Remove FNM_PERIOD to make patterns not completely crazy

Seppo Yli-Olli requested to merge tweak-patterns into master
FNM_PERIOD
    Treat the `.' character specially if it appears at the beginning of string. 
    If this flag is set, wildcard constructs in pattern cannot match `.' as the
    first character of string. If you set both FNM_PERIOD and FNM_FILE_NAME,
    then the special treatment applies to `.' following `/' as well as to `.'
    at the beginning of string. (The shell uses the FNM_PERIOD and
    FNM_FILE_NAME flags together for matching file names.)

So essentially shell-like semantics results in you needing patterns like *(/*)*(/.*)*(/*) at the beginning of string for full directory match.

Edited by Seppo Yli-Olli

Merge request reports