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

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -