PassiveSupport.String.match
You're seeing just the function
match
, go back to PassiveSupport.String module for more information.
Link to this function
match(string, pattern, opts \\ [])
Specs
Converts the provided pattern to a regular expression, if necessary,
and then invokes Regex.run
on the expression and the string.
Useful for invoking regular expressions on strings in the middle of transformation pipelines.
Examples
iex> match("footwear, fun, and fondue", "((f[ou])[no]).+")
["footwear, fun, and fondue", "foo", "fo"]
iex> match("fööd!", "öö")
["öö"]
iex> match("footwear, fun, and fondue", ~r/((f[ou])[no]).+/U)
["foot", "foo", "fo"]