sed substring between two strings code example Example: sed get substring between two characters echo "Here is a string" | grep -o -P '(?<=Here).*(?=string)'