WhiteBread v2.8.1 WhiteBread.RegexExtension
Summary
Functions
Takes a regex and matches it against the string. Returns named groups with atoms as keys
Functions
Takes a regex and matches it against the string. Returns named groups with atoms as keys.
Examples
iex> atom_keyed_named_captures(~r/hello (?
iex> atom_keyed_named_captures(~r/(?[a-z]+) (?[a-z]+)/, “hello earth”) [a: "hello", b: "earth"]
iex> atom_keyed_named_captures(~r/.+/, “hello earth”) []