diff --git a/Dapper/SqlMapper.cs b/Dapper/SqlMapper.cs index 369d71e7b..583e06ec3 100644 --- a/Dapper/SqlMapper.cs +++ b/Dapper/SqlMapper.cs @@ -2108,7 +2108,7 @@ internal static int GetListPaddingExtraCount(int count) private static string GetInListRegex(string name, bool byPosition) => byPosition ? (@"(\?)" + Regex.Escape(name) + @"\?(?!\w)(\s+(?i)unknown(?-i))?") - : ("([?@:]" + Regex.Escape(name) + @")(?!\w)(\s+(?i)unknown(?-i))?"); + : ("([?@:$]" + Regex.Escape(name) + @")(?!\w)(\s+(?i)unknown(?-i))?"); /// /// Internal use only. @@ -2373,14 +2373,14 @@ private static IEnumerable FilterParameters(IEnumerable(16); foreach (var p in parameters) { - if (Regex.IsMatch(sql, @"[?@:]" + p.Name + @"([^\p{L}\p{N}_]+|$)", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.CultureInvariant)) + if (Regex.IsMatch(sql, @"[?@:$]" + p.Name + @"([^\p{L}\p{N}_]+|$)", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.CultureInvariant)) list.Add(p); } return list; } // look for ? / @ / : *by itself* - private static readonly Regex smellsLikeOleDb = new(@"(?