View Source GlobEx.Sigils (glob_ex v0.1.8)

This module provides the sigils ~g|| and ~G||.

Summary

Functions

Handles the sigil ~G for globs.

Handles the sigil ~g for globs.

Functions

Link to this macro

sigil_G(arg, options)

View Source (macro)

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
Link to this macro

sigil_g(term, modifiers)

View Source (macro)

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