// Language: Ruby
text = "user=chris id=42"
if m = text.match(/user=(?<user>\w+)\s+id=(?<id>\d+)/)
puts "user: #{m[:user]}"
puts "id: #{m[:id]}"
end
text = "user=chris id=42"
if m = text.match(/user=(?<user>\w+)\s+id=(?<id>\d+)/)
puts "user: #{m[:user]}"
puts "id: #{m[:id]}"
end