string - Ruby: extract substring between 2nd and 3rd fullstops -
i constructing program in ruby requires value extracted between 2nd , 3rd full-stop in string.
i have searched online various related solutions, including truncation , prior stack-overflow question: get value between 2nd , 3rd comma, no answer illustrated solution in ruby language.
thanks in advance.
list = my_string.split(".") list[2]
that think. first command splits list. second gets bit want
Comments
Post a Comment