select inner or outer text inside 'framing' text patterns