Created
September 25, 2016 11:48
-
-
Save diskshima/9a197cd9eef8be084179db6a77a7c31a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
str = 'I, [2014-09-04T05:17:29.385333 #19220] INFO -- : Parameters: {"users"=>{"profile_url"=>"https://example.com/users/123", "status"=>"1"}}' | |
matches = /[DIWE], \[([0-9\-T:\.]+).* Parameters: ({.*)/.match(str) | |
matches.to_a.each_with_index do |m, index| | |
puts "#{index}: #{m}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment