Получите все между двумя персонажами Regex
(?<=\[)(.*?)(?=\])
Encouraging Emu
(?<=\[)(.*?)(?=\])
(?<=This is).*?(?=sentence)
#dont forgive to escape special characters with \
part1 ([\s\S]*?) part2
(?s)(?<=This is).*?(?=sentence)
echo %H#E%L#L%O! | sed 's/[#%]//g' #replaces every appearance of any of
two characters # and %