ruby - How do you parse this string? -


/events/3122671255551936/?ref=br_rs&action_history=null 

i extract number after '/events/' , before '/?ref=br_rs... \

you split / character:

irb(main):003:0> "/events/3122671255551936/?ref=br_rs&action_history=null".split("/")[2] => "3122671255551936" 

Comments