Using Ruby + regex, given:
starting-middle+31313131313@mysite.com
I want to obtain just: 31313131313
31313131313
ie, what is between
Here is a solution without regex (much easier for me to read):
i = to.index("+") j = to.index("@") to[i+1..j-1]