Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bval/134289 to your computer and use it in GitHub Desktop.
Save bval/134289 to your computer and use it in GitHub Desktop.
site = "www.website.com"
months = ["www.website.com/awstats042009.www.website.com.txt", "www.website.com/awstats052009.www.website.com.txt"]
# below works better
months.map! { |m| m[/#{site}\/awstats([0-9]{6})\.#{site}\.txt/,1] }
puts months
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment