Plain text:
public class ProcedureNameProvider : SqlObjectNameProvider
{
protected override string RegExPattern => @"((?!PROCEDURE).)*[\s]+PROCEDURE(\s*)(?[^\s]+)[\s]+";
public override string GetNameFromSqlScript(string sqlObjectDefinition)
{
Match match = new Regex(RegExPattern, RegexOptions.IgnoreCase).Match(sqlObjectDefinition);
return match.Success ? NormalizeBrackets(match.Groups["proc_name"].Value) : String.Empty;
}
}
No comments:
Post a Comment