# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(?<=from..)(.*)(?=module)(.*)(module)/@module/g;t' <<< "import { service1 } from \"./module/1.service\";
import { service2 } from \"../module/2.service\";
import { service3 } from \"../../module/3.service\";
import { service4 } from \"../../../module/4.service\";
import { service5 } from \"../../../../module/5.service\";
import { service6 } from \"../../../../../module/6.service\";
import { service7 } from \"../../../../../../module/7.service\";
import { service8 } from \"../../../../../../../module/8.service\";
import { service9 } from \"@module/9.service\";
import { service10 } from \"@module/10.service\";
import { service11 } from \"@module/11.service\";"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html