using System;
using System.Text.RegularExpressions;
class Program
{
static void Main(string[] args)
string sql = "SELECT * FROM ARTICOL_UNIC a INNER JOIN @IDArticol p.id = a.ID && p.test = a.TEST && @IDConcern i ON i.id = a.ID";
string paramName = "@IDArticol";
// Find the specified parameter alias in the SQL string
Match match = Regex.Match(sql, $@"(?i){paramName}\s+(\w+)\s+\b(\w+)\b\s+\1\.id\s*=");
if (match.Success)
// Replace "=" with "<>"
string replaced = Regex.Replace(match.Value, "=", "<>");
// Replace the original SQL string with the updated string
sql = sql.Replace(match.Value, replaced);
}
Console.WriteLine(sql);