Skip to content

Modern Fs MatchPattern

Paul Squires edited this page Oct 14, 2026 · 4 revisions

Home › Filesystem › Filesystem Library › MatchPattern

MatchPattern

boolean. PURE -- no syscalls.

Syntax

MatchPattern( s, pattern )

Notes

  • boolean. PURE -- no syscalls.

Examples

#import "std/fs"
using fs

'' PURE -- no syscalls. It matches TEXT against a glob, and never asks
'' whether anything exists.
print MatchPattern( "main.tiko", "*.tiko" )          '' true
print MatchPattern( "main.ti", "*.tiko" )           '' false

'' ? is one character, [] is a set
print MatchPattern( "a1.tiko", "a?.tiko" )           '' true
print MatchPattern( "a1.tiko", "a[0-9].tiko" )       '' true

'' Case follows the grammar, so this is true on Windows
print MatchPattern( "MAIN.TIKO", "*.tiko" )

Library: Filesystem Library
Category: Filesystem
Documented under: Glob

Clone this wiki locally