What would be the textbook way of accomplishing the following tasks:
I have a string s of the from s_s * s_l * s_q * s_r * s_e, where by * I mean the concatenation operator.
Given s, s_l and s_r I am interested in returning s_q, we may assume that s_l and s_r only occur once in s.
As an example: s = "abcdefghij", s_l = "cd", s_r = "hi" so s_q = "efg".
Would a regex approach be appropriate in this situation?