Is there a quick way to find every match of a regular expression in Ruby? I've looked through the Regex object in the Ruby STL and searched on Google to no avail.
Using scan should do the trick:
scan
string.scan(/regex/)
1.4m articles
1.4m replys
5 comments
56.9k users