Loading files
using System.Text.RegularExpressions;
namespace Hast.Transformer.Vhdl.Tests.Common.Helpers;
public static class VerificationSourceScrubbers
{
public static string RemoveDateComments(string source)
{
source = source.RegexReplace(
@"-- Generated by Hastlayer \(hastlayer.com\) at ([0-9\-\s\:]*UTC)",
"-- Generated by Hastlayer (hastlayer.com) at <date and time removed for approval testing>",
RegexOptions.Compiled);
source = source.RegexReplace(
@"-- Date and time:([0-9\-\s\:]*UTC)",
"-- (Date and time removed for approval testing.)",
RegexOptions.Compiled);
return source;
}
public static string RemoveHastIpId(string source) =>
source.RegexReplace(
@"-- Hast_IP ID: ([0-9a-z]*)",
"-- (Hast_IP ID removed for approval testing.)",
RegexOptions.Compiled);
}
a4519e7a0This file is pinned to the selected release. Download the original to open it in your design tool.