From 6bacecb4f6225e3f95ab6ac620887d5c1c47626d Mon Sep 17 00:00:00 2001 From: Pooya Daravi Date: Fri, 5 Jan 2018 15:07:08 -0800 Subject: [PATCH] Changed for loop to foreach. Previous parantheses syntax in for loop is not accepted 0.5 and onward, resulting in an error when trying to run this example. See https://github.com/JuliaLang/julia/issues/17668 --- src/string_manipulation.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string_manipulation.jl b/src/string_manipulation.jl index bc4d4c5..35a0a59 100644 --- a/src/string_manipulation.jl +++ b/src/string_manipulation.jl @@ -44,7 +44,7 @@ println(r) # [eachmatch](http://julia.readthedocs.org/en/latest/stdlib/base/#Base.eachmatch) returns an iterator over all the matches r = eachmatch(r"[\w]{4,}", s1) -for(i in r) print("\"$(i.match)\" ") end +foreach(i -> print("\"$(i.match)\" "), r) println() #> "quick" "brown" "jumps" "over" "lazy"