/ Published in: Ruby
If you're using Rails and want to make this a global function, drop this into your application_controller and call it as a function.
Example:
# get_string_between("hellomyfriendmoto", 'o', 'm')
# > myfriend
Example:
# get_string_between("hellomyfriendmoto", 'o', 'm')
# > myfriend