Convert a regex struct in to a string in elixir -


is there simple way string representation of regex? passing regex io.inspect prints out string representation assume must possible in way

you can use regex.source/1.

regex.source(regex)

returns regex source binary.

demo:

iex(1)> regex.source(~r/[a-z]/) "[a-z]" 

Comments

Popular posts from this blog

Multilayer CSV to filtered excel -

Listboxes in c# -

ios - Why must I define variables twice in the Header file? -