'''pattern matching''' ** See Also ** [Icon Programming Language%|%Icon]: a very capable pattern-matching system that is not based on [regular expressions]. [fptools]: implements pattern matching on lists. ** Description ** There are a number of different options when it comes to matching data against some form of pattern. In [Tcl], you might be interested in: * simple string replacements, as in [string map] (which, in this case, patterns are classes of literal characters) * matching file names: [glob] * [string match] which are [glob]-style patterns * [regexp]/[regsub] which are [regular expressions] * searching for patterns in lists: [lsearch] * [switch] / [case] * [array] get/names/unset (which support ''string match'' type patterns) * [chan] names (which supports ''string match'' type patterns) * [dict] filter/key/values (which support ''string match'' type patterns) * [file] channels (which supports ''string match'' type patterns) * [info] commands/functions/globals/locals/procs/vars (which support ''string match'' type patterns) * [auto_import] which supports [namespace] import patterns * [auto_mkindex] which supports [glob] patterns * [namespace] children * [namespace] export * [namespace] forget * [namespace] import * [registry] keys/values (which support ''string match'' type patterns) * the [Expect] extension, which makes use of regular expressions * [algebraic types] or [unification] <> Concept