# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(?m)(^\[assembly: System\.Reflection\.AssemblyVersion\(")[\d.]+/${1}2.0.0.0_delta/gm;t' <<< "//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System.Runtime.InteropServices;
[assembly: System.Reflection.AssemblyVersion(\"1.1.31.0\")]
[assembly: System.Reflection.AssemblyCompany(\"Name\")]
[assembly: System.Reflection.AssemblyProduct(\"Name\")]
[assembly: System.Reflection.AssemblyCopyright(\"Name\")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]"
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