Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 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