Skip to content

Commit 0d1dcf6

Browse files
committed
Update regex to only match whole select attributes and skip CAST subexpressions
1 parent 6c46104 commit 0d1dcf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5470,7 +5470,7 @@ public static string PagingSelect(string select)
54705470
try
54715471
{
54725472
IDictionary<string, string> maps = new Dictionary<string, string>();
5473-
foreach (Match match in Regex.Matches(pagingSelect, @"GX_ICTE\.(\[\w+\]) AS \b(\w+)\b", RegexOptions.Compiled | RegexOptions.CultureInvariant))
5473+
foreach (Match match in Regex.Matches(pagingSelect, @"GX_ICTE\.(\[\w+]) AS \b(\w+)\b(?=,|$)", RegexOptions.Compiled | RegexOptions.CultureInvariant))
54745474
{
54755475
if (match.Groups.Count == 3)
54765476
{

0 commit comments

Comments
 (0)