View Source GlobEx.Sigils (glob_ex v0.1.4)

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

Link to this section Summary

Functions

Handles the sigil ~G for globs.

Handles the sigil ~g for globs.

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

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

Examples

iex> ~g|*.txt|
~g|*.txt|

iex> ~g|*.#{"txt"}|
~g|*.txt|

iex> GlobEx.match?(~g|f\#{a,b}|, "f#a")
true