#!/bin/bash
echo -e "one\ntwo\nthree" | sed -z 's/one.*two/one/'