Ruby substring regex. How can I extract the substring from a string in ruby? 1.