Packages
Validation library with +25 fully tested rules — Email, IBAN, Credit Card, UUID, MacAddress... and many more!
Current section
Files
Jump to
Current section
Files
lib/sandbox/sandbox.ex
defmodule Sandbox.Sandbox do
@moduledoc false
def sandbox do
# IO.inspect String.match?("\t", ~r/^[a-z]*$/) # false
# IO.inspect String.match?("\r", ~r/^[a-z]*$/) # false
# IO.inspect String.match?("9", ~r/^[a-z]*$/) # false
# true... but shouldn't be false as well?
# IO.inspect String.match?("\n", ~r/^[a-z]*$/)
# IO.inspect String.match?("\n", ~r/^[0-9]*$/)
IO.inspect String.match?("\n", ~r/^\n$/)
# IO.inspect String.match?("\n", ~r/^[0-9]$/)
end
end