View Source GlobEx.Sigils (glob_ex v0.1.11)
This module provides the sigils ~g||
and ~G||
.
Summary
Functions
Handles the sigil ~G
for globs.
It returns a glob expression pattern without interpolations and without escape characters.
See the module documentation GlobEx
for how to write a glob expression.
Examples
iex> ~G|*.txt|
~g|*.txt|
iex> GlobEx.match?(~G|f#{a,b}|, "f#a")
true
Handles the sigil ~g
for globs.
See the module documentation GlobEx
for how to write a glob expression.
Examples
iex> ~g|*.txt|
~g|*.txt|
iex> ~g|*.#{"txt"}|
~g|*.txt|
iex> GlobEx.match?(~g|f\#{a,b}|, "f#a")
true