How do I split column values in a data table with regex?


I am trying to split some column values and I am working with this…

row(“Request Data”).System.Text.RegularExpressions.Regex.Split("\s[a-z]|[A-Z]")

But this is giving me a validation error
I am not exactly sure how I need to format this in Studio.

You cannot use .Split with regular expression separator.
To split based on a pattern you should use Regex.Split in the name space System.Text.RegularExpressions.

Refer the link below.

I agree…and now I see I posted the wrong screenshot


The syntax used is wrong.

It should be
System.Text.RegularExpressions.Regex.Split(row("Request Data"), "\s[a-zA-Z]")

See a sample code below.

using System;
using System.Text.RegularExpressions;

class Program
    static void Main()
        string operation = "3 * 5 = 15";

        string[] operands = Regex.Split(operation, @"\s+");

        foreach (string operand in operands)

See some more examples below.

Hey man.

Sorry I didn’t respond a couple of days ago but you were a big help.

Thank you