Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
str = "This is a string"
|
||||
if str =~ ~r/string$/, do: IO.inspect "str ends with 'string'"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
str =~ ~r/this/ # => false
|
||||
str =~ ~r/this/i # => true
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
str1 = ~r/a/ |> Regex.replace(str,"another")
|
||||
str2 = str1 |> String.replace(~r/another/,"even another")
|
||||
|
|
@ -0,0 +1 @@
|
|||
str3 = ~r/another/ |> Regex.replace(str2, fn x -> "#{String.upcase(x)}" end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue