string
|> String.replace(string, ~r/[^\[\](){}]/, "")
|> IO.inspect(label: "\n")
|> String.codepoints
|> check_brackets([]) 1) test math expression (BracketPushTest)
test/bracket_push_test.exs:52
** (FunctionClauseError) no function clause matching in Keyword.get/3
The following arguments were given to Keyword.get/3:
# 1 ""
# 2
:insert_replaced
# 3
nil
Attempted function clauses (showing 1 out of 1):
def get(keywords, key, default) when is_list(keywords) and is_atom(key)
code: assert BracketPush.check_brackets("(((185 + 223.85) * 15) - 543)/2") == true
stacktrace:
(elixir) lib/keyword.ex:195: Keyword.get/3
(elixir) lib/string.ex:1372: String.replace/4
(bracket_push) lib/bracket_push.ex:15: BracketPush.check_brackets/1
test/bracket_push_test.exs:53: (test)
test/bracket_push_test.exs:52
** (FunctionClauseError) no function clause matching in Keyword.get/3
The following arguments were given to Keyword.get/3:
# 1 ""
# 2
:insert_replaced
# 3
nil
Attempted function clauses (showing 1 out of 1):
def get(keywords, key, default) when is_list(keywords) and is_atom(key)
code: assert BracketPush.check_brackets("(((185 + 223.85) * 15) - 543)/2") == true
stacktrace:
(elixir) lib/keyword.ex:195: Keyword.get/3
(elixir) lib/string.ex:1372: String.replace/4
(bracket_push) lib/bracket_push.ex:15: BracketPush.check_brackets/1
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/ec0892c5-04b8-4fe7-88b5-e12312483fa6%40googlegroups.com.
Traceback (most recent call last):
1: from test.rb:1:in `<main>'
test.rb:1:in `gsub': wrong argument type Symbol (expected Regexp) (TypeError)Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: replace() argument 1 must be str, not int--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/52657dee-f2e3-44de-a430-0b8d72eeccad%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LVm9tq4%2BQ1G3Gk0zTaaNiCySBy3XYYmhJHkj28DpDxXQ%40mail.gmail.com.