dot-notes v1.0.0 DotNotes.Pattern
This module defines various utilities to do with matching Regex patterns. All are defined here so that they can be compiled once at compile time and then used via common functions.
Summary
Functions
Retrieves the first match of an internal Regex against a given binary
Determines whether a binary matches an internal Regex
Functions
Specs
first_match(value :: binary, pattern :: atom) :: match :: binary
Retrieves the first match of an internal Regex against a given binary.
We pull only the first match and unwrap the found value. If no value is found
then we return a nil
value.