What happens with this?

  sed 's/y/i/g' <<-''EOL
  xxyyzz
  EOL