lundi 20 avril 2015

Ruby regex method

I need to get the expected output in ruby by using any method like scan or match.

Input string:

  1. "http://ift.tt/1E0RzJL"
  2. "http://ift.tt/1FZLWZf"

Expected:

  1. r12=1,r122=1, r1=1, r124=1
  2. r12=1,r124=1

How can I get the expected output using regex?

Aucun commentaire:

Enregistrer un commentaire