Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
StringTools[WildcardMatch] - match strings against glob-style patterns
Calling Sequence
WildcardMatch( pattern, text )
Parameters
pattern
-
Maple string
text
Description
The WildcardMatch(pattern, text) command provides glob-style pattern matching. Given a pattern containing wildcards, and an input string text, WildcardMatch returns the value true if the given text matches the pattern, and returns the value false otherwise.
The wildcards are similar to those used in filename globbing in UNIX shells. These are defined as follows.
*
matches zero or more characters
?
matches one character
[ccl]
matches any character in the character class
ccl
Character classes denote sets of characters to match. A character class is enclosed in square brackets (). It can be a simple list of characters, such as , which matches any of the characters , , , or . Character classes can include character ranges, which are defined by their order in the US-ASCII character encoding. For example, the character class matches any lowercase letter, and matches any digit. A character class can be negated (or complemented) by including the character as the first within the character class. Thus, for instance, denotes the set of characters other than the digits. The "^" character has this special complementing meaning only when it appears as the first character in a character class. If it appears elsewhere, then it stands for itself. To include a hyphen character "-" in a character class, write it as the first character in the character class, or include it in a character range. To include the character "]" in a character class, write it as the first character following the opening bracket, or include it in a character range.
Pattern matching facilities provided by the StringTools package include regular expression matching (see StringTools[RegMatch]) and fast string search (see StringTools[Search] and searchtext).
Examples
Escape the opening square bracket ([) in the pattern using two backslashes to interpret it as a normal character.
See Also
searchtext, string, StringTools, StringTools[RegMatch], StringTools[Search]
Download Help Document