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
Post a Comment