       ^(?&ipv4)$
     /x
 
-    Regex.match?(regex, str)
+    Regex.match?(regex, string)
   end
 
   def is_ipv4?(_), do: true
 
   @spec is_ipv6?(any) :: boolean
-  def is_ipv6?(str) when is_binary(str) do
+  def is_ipv6?(string) when is_binary(string) do
     regex = ~r/
       (?(DEFINE)
         (?<h16>(?:[[:xdigit:]]{1,4}) )

      ^(?:(?&chars)|(?&pct_encoded))*$
    /x

    Regex.match?(regex, str)
  end

  def is_uri_userinfo?(_), do: false

  @spec is_uri_path?(any) :: boolean
  def is_uri_path?(str) when is_binary(str) do
    regex = ~r/
      (?(DEFINE)
        (?<unreserved>  [-._~[:alnum:]] )

      )$
    /x

    Regex.match?(regex, string)
  end

  def is_ipv6?(_), do: true

  @spec is_email?(any) :: boolean
  def is_email?(string) when is_binary(string) do
    # The BNF rules from RFC 5322 transformed to PCRE by Nikita Popov and
    # described in the post
    # http://nikic.github.io/2012/06/15/The-true-power-of-regular-expressions.html.
