RegexpFind capture group does not work

Hello, I believe I am using the capture group parameter correctly, but I'm not succeeding with it.

input string:

exec sp_executesql N'INSERT INTO [ScheduleTasks] ([sxkScheduleTreeID], [sxkScheduleBranchID], [sxkScheduleTaskID], [sxkPlantID], [sxkPlantDepartmentID], [sxkProcessID], [sxkLinkedTaskID], [sxkCurrentTaskDateType], [sxkLinkedTaskDateType], [sxkScheduleTypeID], [sxkStartActualDateTime], [sxkEndActualDateTime], [sxkExchangeID], [sxkCreatedBy], [sxkCreatedDate], [sxkUniqueID], [sxkStartDate], [sxkEndMinute], [sxkEndDate], [sxkStartMinute], [sxkOffsetMinutes]) VALUES (&p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10, &p11, &p12, &p13, &p14, &p15, &p16, &p17, &p18, &p19, &p20, &p21)',N'&p1 int,&p2 int,&p3 int,&p4 nvarchar(4000),&p5 nvarchar(4000),&p6 nvarchar(5),&p7 int,&p8 tinyint,&p9 tinyint,&p10 tinyint,&p11 datetime,&p12 datetime,&p13 nvarchar(4000),&p14 nvarchar(6),&p15 datetime,&p16 uniqueidentifier,&p17 datetime,&p18 smallint,&p19 datetime,&p20 smallint,&p21 int',&p1=17496,&p2=0,&p3=10,&p4=N'',&p5=N'',&p6=N'DESIG',&p7=0,&p8=0,&p9=0,&p10=1,&p11='2019-04-19 10:59:00',&p12='2019-05-01 08:59:00',&p13=NULL,&p14=N'josshi',&p15='2023-11-07 09:46:15.600',&p16='3D5E3419-E737-4A5E-A07A-48D31EEA7408',&p17='2019-04-19 00:00:00',&p18=179,&p19='2019-05-01 00:00:00',&p20=299,&p21=0

function + expression:






so far I have been using SUBSTITUTE() to separate the key from value but it's not elegant.

I hope someone can tell me how to make this work. Thank you!

EDIT: my example text contains 'at-signs' which are interpreted as mentions, which prevents me from posting as-is. I have substituted them all with '&' just so I can get on with posting.

Works for me, maybe you have some mistake with your order of arguments making the "1" not belonging to the group argument?