• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.45 Miscellaneous
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Miscellaneous
          • dwim_match/2
          • dwim_match/3
          • wildcard_match/2
          • wildcard_match/3
          • sleep/1
    • Packages
Availability:built-in
wildcard_match(+Pattern, +String)
wildcard_match(+Pattern, +String, +Options)
True if String matches the wildcard pattern Pattern. Pattern is very similar to the Unix csh pattern matcher. The patterns are given below:

? Matches one arbitrary character.
* Matches any number of arbitrary characters.
[ ... Matches one of the characters specified between the brackets.
<char1>-<char2> indicates a range.
{...} Matches any of the patterns of the comma-separated list between the braces.

Example:

?- wildcard_match('[a-z]*.{pro,pl}[%~]', 'a_hello.pl%').
true.

The wildcard_match/3 version processes the following option:

case_sensitive(+Boolean)
When false (default true), match case insensitively.
ClioPatria (version V3.1.1-51-ga0b30a5)