What is the difference between ".scan" and ".split" in Ruby language? -


this question has answer here:

what difference between ".scan" , ".split" in ruby language?

can give me example?

i got confused it!

  • scan extracts substrings match given regex.
  • split extracts substrings not match given regex (and optionally, substrings match well).

Comments

Popular posts from this blog

asp.net - Session has Expired in IE 10,9,8 -

PHP Error "Undefined index" -

C# List<> to xml -