Any help on a regex?

for the below:

22,579,029.59-196,288,552.58-196,288,552.58-6 Total Object Account 250101 22,579,029.59-22,579,029.59-196,288,552.58-196,288,552.58

I am looking to extract the 6 digits after “Total Object Account” and then in a second variable the first set of numbers after that 6 digit number(in this case the 22,579,029.59.

Have started with this: (?<=Total Object Account ).+")

Any ideas welcome. This will be used the same on other categories to build a dt. We just have to pull one by one through a get visible text activity

Hi @Chris_Bolin,

Since you are looking for the for 6 consecutive digits after a specified keyword.

You can use

For first number : where group name is Number

\sTotal\sObject\sAccount\s(?P<Number>\d{6})

\s specify space
\d digits
{6} for 6 digits

For the set: Where group name is Sets

\s(?P<Sets>\d+,\d+,\d+.\d+)

Unfortunately this did not get what I needed but thank you. It is giving irregular grouping errors

@Chris_Bolin,

I verified the expressions on regex101.com so it should work on UiPath as well.

You have to get the groups. See here on how to access group values : Regex help tutorial MEGAPOST – Making your first Regex post, Reusable Regex Patterns, Regex Troubleshooting, Sample Workflow and more

@Chris_Bolin - Is this what you are looking for??

Here you go:

1 Like

You always come through! Thank you! This works

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.