Check out example codes for "ruby get substring between two characters". It will help you in understanding the concepts better.

Code Example 1

str1_markerstring = "START"
str2_markerstring = "END"

substring = input_string[/#{str1_markerstring}(.*?)#{str2_markerstring}/m, 1]

Learn ReactJs, React Native from akashmittal.com