Using Ruby + regex, given:
starting-middle+31313131313@mysite.com
I want to obtain just: 31313131313
31313131313
ie, what is between
Between 1st + and 1st @:
+
@
to[/\+(.*?)@/,1]
Between 1st + and last @:
to[/\+(.*)@/,1]
Between last + and last @:
to[/.*\+(.*)@/,1]
Between last + and 1st @:
to[/.*\+(.*?)@/,1]