FauxRedis.Glob (faux_redis v1.0.2)

Copy Markdown View Source

Redis-style glob pattern matching used by KEYS and SCAN ... MATCH.

Supports the pattern syntax documented for Redis KEYS:

  • * – matches any number of characters (including zero)
  • ? – matches exactly one character
  • [aeiou] – matches a single character from the set
  • [^aeiou] – matches a single character not in the set
  • [a-z] – character ranges inside a class
  • \ – escapes the next pattern character so it is matched literally

Matching is byte-oriented, consistent with Redis key comparison.

Summary

Functions

match?(text, pattern)

@spec match?(binary(), binary()) :: boolean()