# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/public ([\w><]+ [\w><]+\(\))\s+{[^}]+}/\1;/gm;t' <<< "using System.Linq;
using NineYi.ERPV2.DA.AppDB.Tables;
namespace NineYi.ERPV2.DA.Repositories.DbRepositories
{
/// <summary>
/// AppDbRepository
/// </summary>
public class AppDbRepository : IAppDbRepository
{
/// <summary>
/// AppDbContext
/// </summary>
private AppDbContext _appDbContext;
/// <summary>
/// Initializes a new instance of the <see cref=\"AppDbRepository\" /> class.
/// </summary>
/// <param name=\"appDbContext\">AppDbContext</param>
public AppDbRepository(AppDbContext appDbContext)
{
this._appDbContext = appDbContext;
}
/// <summary>
/// SaveChanges
/// </summary>
public void SaveChanges()
{
this._appDbContext.SaveChanges();
}
/// <summary>
/// QueryUserCoupons
/// </summary>
/// <returns>UserCoupons</returns>
public IQueryable<user_coupon> QueryUserCoupons()
{
return this._appDbContext.user_coupon;
}
/// <summary>
/// QueryPubContents
/// </summary>
/// <returns>PubContents</returns>
public IQueryable<pub_content> QueryPubContents()
{
return this._appDbContext.pub_content;
}
}
}"
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