Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby get substring between two characters

str1_markerstring = "START"
str2_markerstring = "END"

substring = input_string[/#{str1_markerstring}(.*?)#{str2_markerstring}/m, 1]
 
PREVIOUS NEXT
Tagged: #ruby #substring #characters
ADD COMMENT
Topic
Name
7+8 =