Open AlexWayfer opened 4 years ago
Friendly reminder: String#match
outputs a MatchData
while String#scan
outputs an Array
.
Friendly reminder:
String#match
outputs aMatchData
whileString#scan
outputs anArray
.
Yes, but they're similar, but an outside code will be different for the same input data (String
and Regexp
). But the point of comparison of these approaches is they complete the similar goal.
@AlexWayfer If you're still interested in this, feel free to open a PR. All you need to do is follow the guidelines in the CONTRIBUTING.md.
Hello.
These methods are pretty similar.
I've done some benchmarks and figured out that
match
is twice faster thanscan
.I can try to make a PR, but not sure do we need for it here.